On 4/4/06, Brian Henning <[EMAIL PROTECTED]> wrote:
> ...why aren't you using PHP's built-in date/time functions?

Ok.

But...

echo date("Y-m-d",strtotime("last Monday")), "\n";

yet gives me 2006-04-03 instead of 2006-03-27.  I still have to resort
to a loop to get the right numbers of days back...which is ok because
date() and strtotime do it correctly.

<?php
$day = date("l") ;
print "<br>Day is $day - Before<br>";
switch ($day) {
case "Monday":
   print "<br>Day is $day - During<br>";
   $startdated = date("Y-m-d",strtotime("a week ago")) ;
   break;

and so on.  I still don't understand why the other loop didn't work. 
I guess it doesn't matter.  Thanks Brian.

MPF
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/

Reply via email to