note 79823 deleted from function.date by danbrown

From: Date: Sun, 20 Jul 2008 02:46:52 +0000
Subject: note 79823 deleted from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141985@lists.php.net to get a copy of this message
Note Submitter: Bill at wLathrop com ---- For JasonLFunk I did some testing on the occurrence for a given date within the month (i.e 1st Monday, 2nd Wednesday, 3rd Friday, etc.). where $dDate is a getdate() array intval(($dDate['mday']-1)/7)+1 Returns an integer representing the week for a given date. I tested on a complete calendar month and it seems to work well. I then convert to a string and compare to a string list of values to see if it is in the list. If it is - it qualifies. So, my list of values might be '2,4' representing every 2nd and 4th occurrence.

« previous php.notes (#141985) next »