Re: date problem: some months have 5 weeks... how I discoverwhich ones?

From: Date: Fri, 19 Jan 2001 00:32:17 +0000
Subject: Re: date problem: some months have 5 weeks... how I discoverwhich ones?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35524@lists.php.net to get a copy of this message
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 <jeremy@nirvani.net> To: Romulo Roberto Pereira <php@diffdev.com> Cc: php-general <php-general@lists.php.net> 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 :: jeremy@nirvani.net 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 <php@diffdev.com> > To: php-general <php-general@lists.php.net> > 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#35524) next »