For a newspaper, a week start on sunday and ends in a saturday.
Media planners divide ads in newspapers by monhs and than by weeks,
respectively.
so let's say:
january 2001 started in a monday
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 - 1st week
7 8 9 10 11 12 13 - 2nd week
14 15 16 17 18 19 20 - 3rd week
21 22 23 24 25 26 27 - 4th week
28 29 30 31 - 5th week
So january is a month that has 5 weeks for a newspaper, because if I would
put an ad on a tuesday, january has 5 tuesdays.. got it?
How do I do to calculate that?
Damn question!
Rom
----- Original Message -----
From: jeremy brand <[EMAIL PROTECTED]>
To: Romulo Roberto Pereira <[EMAIL PROTECTED]>
Cc: php-general <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 7:14 PM
Subject: Re: [PHP] date problem: some months have 5 weeks... how I
discoverwhich ones?
All months have more than 4 weeks except February (but only when it is
not a leap year).
I'm probably not understanding what exactly you are trying to do.
By your definition then, wouldn't this month only have 3 weeks?
January 2001
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Yet there are 10 unaccounted days which is 1 and 3/7 more weeks.
Jeremy
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.JEEP-FOR-SALE.com/ -- I need a buyer
Get your own Free, Private email at http://www.smackdown.com/
On Thu, 18 Jan 2001, Romulo Roberto Pereira wrote:
> Date: Thu, 18 Jan 2001 19:07:31 -0500
> From: Romulo Roberto Pereira <[EMAIL PROTECTED]>
> To: php-general <[EMAIL PROTECTED]>
> Subject: [PHP] date problem: some months have 5 weeks... how I discover
which
ones?
>
> Hey!
>
> A little bit of definition:
>
> - a week start on sunday and ends on saturday;
>
> - a year has 365/7 ~= 52 weeks;
>
> How do I discover what months have 5 weeks and what have 4?
>
> Rom
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]