Reply to Re: Interesting date

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация