note 96095 deleted from function.strtotime by peehaa

From: Date: Fri, 06 Jan 2017 16:07:00 +0000
Subject: note 96095 deleted from function.strtotime by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208735@lists.php.net to get a copy of this message
Note Submitter: katylava at gmail dot com ---- You should play around with strtotime() before you decide what it can't do. for example: <?php # on 2/8/2010 date('m/d/y', strtotime('first day')); # 02/01/10 date('m/d/y', strtotime('last day')); # 02/28/10 date('m/d/y', strtotime('last day next month')); # 03/31/10 date('m/d/y', strtotime('last day last month')); # 01/31/10 date('m/d/y', strtotime('2009-12 last day')); # 12/31/09 - this doesn't work if you reverse the order of the year and month date('m/d/y', strtotime('2009-03 last day')); # 03/31/09 date('m/d/y', strtotime('2009-03')); # 03/01/09 date('m/d/y', strtotime('last day of march 2009')); # 03/31/09 date('m/d/y', strtotime('last day of march')); # 03/31/10 ?>

« previous php.notes (#208735) next »