Re: date to string

From: Date: Sat, 03 Feb 2007 01:37:20 +0000
Subject: Re: date to string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248225@lists.php.net to get a copy of this message
On Thu, February 1, 2007 6:30 pm, John Taylor-Johnston wrote: > How do I take "2007-02-01" and turn it into Thursday, February 1, > 2006? > Simple question, except I don't know the answer :) > This is all I see for now: > http://ca.php.net/manual/en/function.px-date2string.php list($year, $month, $day) = explode('-', '2007-02-01'); //the - 1 is because you SAID you wanted 2006.. //If that's a typo, lose the - 1 part. $time = mktime(1, 0, 0, $month, $day, $year - 1); echo date('l, F d', $time); http://php.net/mktime http://php.net/date -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#248225) next »