note 88606 added to function.strtotime

From: Date: Sat, 31 Jan 2009 08:29:23 +0000
Subject: note 88606 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-150029@lists.php.net to get a copy of this message
Zoe Blade, you should have take care of rtwolf comment below. For exemple, today (2009-01-31) : <?php echo date('Y-m-01', strtotime('next month'); ?> will output 2009-03-01 and not 2009-02-01. So to have the number of days left in the month: <?php $daysLeftInMonth = ceil( ( strtotime("+1 month", strtotime(date("F") . "1")) - time() )/86400 ); ?> My two cents. ---- Server IP: 69.147.83.197 Probable Submitter: 202.22.237.231 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/88606 Del: integrated -- https://master.php.net/note/delete/88606/integrated Del: useless -- https://master.php.net/note/delete/88606/useless Del: bad code -- https://master.php.net/note/delete/88606/bad+code Del: spam -- https://master.php.net/note/delete/88606/spam Del: non-english -- https://master.php.net/note/delete/88606/non-english Del: in docs -- https://master.php.net/note/delete/88606/in+docs Del: other reasons-- https://master.php.net/note/delete/88606 Reject -- https://master.php.net/note/reject/88606 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150029) next »