note 57407 added to function.date

From: Date: Mon, 03 Oct 2005 11:40:08 +0000
Subject: note 57407 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-96291@lists.php.net to get a copy of this message
In response to the recommendation from Liam regarding adding days to a date (which is quite handy): To maintain the format suggested at the top of your code, the $pay_date needs to be formatted using date() & mktime(): $pay_date = date("d - m - Y",mktime(0,0,0,$month,$final,$year)); and: $pay_date = date("d - m - Y",mktime(0,0,0,$month,$next_term,$year)); This keeps the leading zero in your days and months. ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57407 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57407&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57407&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96291) next »