Posted by Toby A Inkster on 02/05/07 11:44
Gunnar G wrote:
> $old = getdate(strtotime("-250 days"));
> and I get right now with
> $old["mon"] and $old["mday"]
> 31 june. Well, that doesn't sound right.
I get $old["mon"] as "5" -- that is, May, not June.
PHP numbers months starting with January as 1. This is different from
Perl's "time" and "gmtime" functions, which number months starting with
January as 0.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
[Back to original message]
|