Re: date of week in month
Are you asking which week of the month a specific day is in? For example, 2007-12-19 is in the 3rd week and 2007-12-25 is in the 4th week?
If you could clarify the question you may get more replies.
Re: date of week in month
There is no such C++ function. You have to compute that by yourself.
Re: date of week in month
Hello,
As Cilu said, there is no ready-made C function to compute this. Moreover, week has different conventions in different countries and contexts like starting from Sunday, Monday or Saturday. One has to do the computation according to one's needs.
Easiest method is to find the day from the date variable and divide the difference by 7 to get the week. One can refine the computation by checking which is the weekday of first of that month and which is the weekday on which the week starts.
Regards,
Pravin.