note 88367 added to function.strtotime

From: Date: Wed, 21 Jan 2009 12:25:45 +0000
Subject: note 88367 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-149592@lists.php.net to get a copy of this message
Just in case anyone else might find these useful, you can work out the number of days left in the month or year like this: $daysLeftInMonth = ceil((strtotime(date('Y-m-01', strtotime('next month'))) - time()) / 86400); $daysLeftInYear = ceil((strtotime(date('Y-01-01', strtotime('next year'))) - time()) / 86400); Note these include the current day. floor() will exclude the current day. ---- Server IP: 92.48.74.199 Probable Submitter: 87.236.134.13 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/88367 Del: integrated -- https://master.php.net/note/delete/88367/integrated Del: useless -- https://master.php.net/note/delete/88367/useless Del: bad code -- https://master.php.net/note/delete/88367/bad+code Del: spam -- https://master.php.net/note/delete/88367/spam Del: non-english -- https://master.php.net/note/delete/88367/non-english Del: in docs -- https://master.php.net/note/delete/88367/in+docs Del: other reasons-- https://master.php.net/note/delete/88367 Reject -- https://master.php.net/note/reject/88367 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149592) next »