note 35799 deleted from function.getdate by salathe

From: Date: Mon, 21 Sep 2020 14:32:34 +0000
Subject: note 35799 deleted from function.getdate by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215194@lists.php.net to get a copy of this message
Note Submitter: Yura Pylypenko (plyrvt at mail dot ru) ---- 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"; ?>

« previous php.notes (#215194) next »