NYCPHP Meetup

NYPHP.org

[nycphp-talk] Current weeks's dates

Freedman, Tom S. tfreedma at ubspw.com
Tue Sep 3 09:36:22 EDT 2002


You can use functions like:

$sunday = date("m/d/y", strtotime("-6 days"));
$saturday = date("m/d/y", strtotime("+1 days"));

in a 'switch (date("w", $inputDate)){}' statement, testing for the weekday
of the given date.  I tried the textual parameters for date (like "last
Sunday") but I found them unreliable, especially when dealing with things
like looking for "next Tuesday" when the supplied date is a Tuesday.

-----Original Message-----
From: Donald J. Organ IV [mailto:dorgan at optonline.net]
Sent: Monday, September 02, 2002 10:39 PM
To: NYPHP Talk
Subject: [nycphp-talk] Current weeks's dates


Is there any way that anyone can think of to get a set of dates sun-sat for
a given date?





More information about the talk mailing list