Given a date, how to find the beginning date and ending date of that week



 DEVELOP > c-Plus-Plus > Given a date, how to find the beginning date and ending date of that week

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Matt"
Date: 08 Nov 2003 02:01:10 PM
Object: Given a date, how to find the beginning date and ending date of that week
Given a date, how to find the beginning date and ending date of that week
please advise!
.

User: "Pete Becker"

Title: Re: Given a date, how to find the beginning date and ending date of thatweek 08 Nov 2003 02:30:36 PM
Matt wrote:


Given a date, how to find the beginning date and ending date of that week

Figure out what day of the week it is (read about the header <time.h>).
From there it's easy.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
.

User: "Gianni Mariani"

Title: Re: Given a date, how to find the beginning date and ending dateof that week 08 Nov 2003 02:24:43 PM
Matt wrote:

Given a date, how to find the beginning date and ending date of that week

please advise!

if date is an integer corresponding to time in a linear elapsed way then
my_linear_time find_beginning_of_week( my_linear_time t )
{
return ( t + day_of_week_offset ) % time_elapsed_in_week;
}
.


  Page 1 of 1

1

 


Related Articles
" Given BACK what was freely GIVEN "
How to completely end a program if some condition given holds true?
Is it possible to call a function which name is given by a string?
How to convert a given local time to UT considering Daylight Saving Times....
Help in my program it is not given the right answer
Given only a pointer to a node to be deleted in a singly linked list, how do u delete it?
Returning Window Position Given Handle
Constructing a Class Given a String
How to use functions of given dll?
implementing constructors given class declarations
to check if the given string is substring using c++
How to load a class from given class name in a string ?
Best way to find rational for a given float
Printing with the given font
How to find at Runtime, if Created class object is instance of given class declaration
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER