note 61092 added to ref.datetime

From: Date: Wed, 25 Jan 2006 14:44:36 +0000
Subject: note 61092 added to ref.datetime
Groups: php.notes 
Request: Send a blank email to php-notes+get-102422@lists.php.net to get a copy of this message
Function for converting RFC 2822 formatted date to timestamp <?php /** * @param string $date RFC 2822 formatted date * @return integer timestamp */ function Rfc2822ToTimestamp($date){ $aMonth = array( "Jan"=>"1", "Feb"=>"2", "Mar"=>"3", "Apr"=>"4", "May"=>"5", "Jun"=>"6", "Jul"=>"7", "Aug"=>"8", "Sep"=>"9", "Oct"=>"10", "Nov"=>"11", "Dec"=>"12"); list( , $day, $month, $year, $time) = explode(" ", $date); list($hour, $min, $sec) = explode(":", $time); $month = $aMonth[$month]; return mktime($hour, $min, $sec, $month, $day, $year); } ?> ---- Server IP: 195.222.164.18 Probable Submitter: 81.18.139.132 (proxied: 81.18.139.137) ---- Manual Page -- http://www.php.net/manual/en/ref.datetime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61092 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61092&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61092&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102422) next »