note 47101 added to function.date

From: Date: Wed, 03 Nov 2004 00:56:21 +0000
Subject: note 47101 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-79523@lists.php.net to get a copy of this message
I was going crazy trying to read the table above -- alpha sorting by option scatters similar formats all over the place. So, I grouped the format characters by the part of the timestamp they return. Enjoy! Fmt Description DAY =========================================================== d Day of the month, 2 digits with leading zeros D A textual representation of a day, three letters j Day of the month without leading zeros l A full textual representation of the day of the week S English ordinal suffix for the day of the month, 2 characters w Numeric representation of the day of the week z The day of the year (starting from 0) WEEK ========================================================== W ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) MONTH ========================================================= F A full textual representation of a month, such as January or March m Numeric representation of a month, with leading zeros M A short textual representation of a month, three letters n Numeric representation of a month, without leading zeros t Number of days in the given month YEAR ========================================================== L Whether it's a leap year Y A full numeric representation of a year, 4 digits y A two digit representation of a year TIME ========================================================== a Lowercase Ante meridiem and Post meridiem A Uppercase Ante meridiem and Post meridiem B Swatch Internet time g 12-hour format of an hour without leading zeros G 24-hour format of an hour without leading zeros h 12-hour format of an hour with leading zeros H 24-hour format of an hour with leading zeros i Minutes with leading zeros s Seconds, with leading zeros TIMEZONE ====================================================== I Whether or not the date is in daylights savings time O Difference to Greenwich time (GMT) in hours T Timezone setting of this machine Z Timezone offset in seconds. Zones west of UTC are negative, east are positive. FULL DATETIME ================================================= c ISO 8601 date (added in PHP 5) r RFC 2822 formatted date U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47101 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47101&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47101&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79523) next »