note 47997 added to function.strtotime

From: Date: Wed, 08 Dec 2004 17:17:38 +0000
Subject: note 47997 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-81535@lists.php.net to get a copy of this message
If you're looking to get the 1st and last day of a month, then date() is what you want. For example date("Y-m-01") => 1st of this month date("Y-m-t") => last of this month (t is num days in the month) date("Y-m-t", strtotime("+1 Month")) => last day of next month. the result from date() can be fed into strtotime, like so: strtotime(date("Y-m-t")) => last of this month as unix timestamp ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47997 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47997&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47997&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81535) next »