WordPress/wp-admin/help/en/dateformats.help.html

66 lines
3.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>WordPress &#8212; Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- fix the FOUC -->
<script type="text/javascript"> </script>
<style type="text/css">
@import url("http://wordpress.org/wp.css");
</style>
</head>
<body>
<div id="main">
<h1 id="logo"><a href="/" title="WordPress"><span>WordPress</span></a></h1>
<div id="content"><h2>Reference</h2>
<dl>
<dt id="dateformat"><a href="#dateformat">About Date &amp; Time formats:</a></dt>
<dd>You can format the date &amp; time in many ways, using the PHP syntax.<br />
As quoted from the PHP manual, here are the letters you can use:
<blockquote>
The following characters are recognized in the format string:<br />
<strong>a</strong> - "am" or "pm"<br />
<strong>A</strong> - "AM" or "PM"<br />
<strong>B</strong> - Swatch Internet time<br />
<strong>d</strong> - day of the month, 2 digits with leading zeros; i.e. "01" to "31"<br />
<strong>D</strong> - day of the week, textual, 3 letters; i.e. "Fri"<br />
<strong>F</strong> - month, textual, long; i.e. "January"<br />
<strong>g</strong> - hour, 12-hour format without leading zeros; i.e. "1" to "12"<br />
<strong>G</strong> - hour, 24-hour format without leading zeros; i.e. "0" to "23"<br />
<strong>h</strong> - hour, 12-hour format; i.e. "01" to "12"<br />
<strong>H</strong> - hour, 24-hour format; i.e. "00" to "23"<br />
<strong>i</strong> - minutes; i.e. "00" to "59"<br />
<strong>I</strong> (capital i) - "1" if Daylight Savings Time, "0" otherwise.<br />
<strong>j</strong> - day of the month without leading zeros; i.e. "1" to "31"<br />
<strong>l</strong> (lowercase 'L') - day of the week, textual, long; i.e. "Friday"<br />
<strong>L</strong> - boolean for whether it is a leap year; i.e. "0" or "1"<br />
<strong>m</strong> - month; i.e. "01" to "12"<br />
<strong>M</strong> - month, textual, 3 letters; i.e. "Jan"<br />
<strong>n</strong> - month without leading zeros; i.e. "1" to "12"<br />
<strong>r</strong> - RFC 822 formatted date; i.e. "Thu, 21 Dec 2000 16:01:07 +0200" (added in PHP 4.0.4)<br />
<strong>s</strong> - seconds; i.e. "00" to "59"<br />
<strong>S</strong> - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"<br />
<strong>t</strong> - number of days in the given month; i.e. "28" to "31"<br />
<strong>T</strong> - Timezone setting of this machine; i.e. "MDT"<br />
<strong>U</strong> - seconds since the epoch<br />
<strong>w</strong> - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)<br />
<strong>Y</strong> - year, 4 digits; i.e. "1999"<br />
<strong>y</strong> - year, 2 digits; i.e. "99"<br />
<strong>z</strong> - day of the year; i.e. "0" to "365"<br />
<strong>Z</strong> - timezone offset in seconds (i.e. "-43200" to "43200"). The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.<br />
<br />
Unrecognized characters in the format string will be printed as-is.
</blockquote>
<p>For more information and examples, check the PHP manual on <a href="http://www.php.net/manual/en/function.date.php">this page</a>.</p>
</dd>
</dl>
</div>
</div>
</body>
</html>