RE: [PHP] Date to find next Friday

From: Date: Tue, 08 Oct 2002 15:28:25 +0000
Subject: RE: [PHP] Date to find next Friday
Groups: php.general 
Request: Send a blank email to php-general+get-119278@lists.php.net to get a copy of this message
Responding to my own message. This is making me a little ticked. I can't think it through. Here's exactly what I need: There are a bunch of series of files (A series, B series, and so on) that are to be released on the first, second, third, fourth, or (if it exists for that month) fifth Friday of a given month. The A series does not necessarily get released on the same Friday of each month as the B series, so the A series could come out on the fourth Friday, while the B series comes out on the third and the C on the fifth, etc. or whatever. I need to know the Next_Release_Friday of a specified series. If there are only four Fridays that month, all those fifth-Friday releases happen on the fourth Friday. Obviously, if a file is released on the first Friday and it so happens that the first Friday for this month has passed, the Next_Release_Friday will be next month, and if it's December, the Next_Release_Friday will be next year's January. Does everybody follow me? It's even confusing trying to ask the question, let alone derive the proper date.

« previous php.general (#119278) next »