Validate week number is withing given month
Posted: Fri Nov 11, 2005 4:22 am
How could I validate that a given week
week number 43(produced by date('W'))
is really within
month x and year y
example:
week 45
it is true that it is in november....probably no matter of the year.
The year will only matter on leap years...not even sure if so.
But:
week 12 is not in month november for sure..
So how can I validate if the week number is within given month.
I was thinking .....taking week number for the firstday of the month
then week number for the last one....
and see if it within these
But taking the last day of the month I am a bit lost...
Thanks for any advice
week number 43(produced by date('W'))
is really within
month x and year y
example:
week 45
it is true that it is in november....probably no matter of the year.
The year will only matter on leap years...not even sure if so.
But:
week 12 is not in month november for sure..
So how can I validate if the week number is within given month.
I was thinking .....taking week number for the firstday of the month
then week number for the last one....
and see if it within these
But taking the last day of the month I am a bit lost...
Thanks for any advice