note 35799 added to function.getdate

From: Date: Mon, 15 Sep 2003 10:29:38 +0000
Subject: note 35799 added to function.getdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-56507@lists.php.net to get a copy of this message
In addition to canby23 at ms19 post: It's a very bad idea to consider day having 24 hours (86400 secs), because some days have 23, some - 25 hours due to daylight saving changes. Using of mkdate() and strtotime() is always preferred. strtotime() also has a very nice behaviour of datetime manipulations: <?php echo strtotime ("+1 day"), "\n"; echo strtotime ("+1 week"), "\n"; echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n"; echo strtotime ("next Thursday"), "\n"; echo strtotime ("last Monday"), "\n"; ?> ---- Manual Page -- http://www.php.net/manual/en/function.getdate.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35799 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35799&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35799&report=yes

« previous php.notes (#56507) next »