note 75905 added to function.strtotime
| From: | vritzka~gmail~com at osu1 dot php dot net | Date: | Thu, 21 Jun 2007 04:52:14 +0000 |
| Subject: | note 75905 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127846@lists.php.net to get a copy of this message | ||
//this returns timestamps from 1st of given month and last
//day of given month
// example:
//$month = 01
// $year = 2007
function get_month_range($month,$year) {
//get timestamp first day of the month
$start = strtotime($year . "-" . $month . "-01",time());
//hww many days in that month?
$days_of_month = date(t,$start);
//get timestamp last day of month
$end = strtotime($year . "-" . $month . "-" . $days_of_month . "
23:59:59",time());
return array($start, $end);
}
----
Server IP: 203.202.10.60
Probable Submitter: 203.59.131.222
----
Manual Page -- http://www.php.net/manual/en/function.strtotime.php
Edit -- https://master.php.net/note/edit/75905
Del: integrated -- https://master.php.net/note/delete/75905/integrated
Del: useless -- https://master.php.net/note/delete/75905/useless
Del: bad code -- https://master.php.net/note/delete/75905/bad+code
Del: spam -- https://master.php.net/note/delete/75905/spam
Del: non-english -- https://master.php.net/note/delete/75905/non-english
Del: in docs -- https://master.php.net/note/delete/75905/in+docs
Del: other reasons-- https://master.php.net/note/delete/75905
Reject -- https://master.php.net/note/reject/75905
Search -- https://master.php.net/manage/user-notes.php