<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>w3it.org - Internet Helper Blog &#187; timestamp explaination</title>
	<atom:link href="http://www.w3it.org/blog/tag/timestamp-explaination/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.w3it.org/blog</link>
	<description>help for internet people</description>
	<lastBuildDate>Tue, 04 May 2010 17:01:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Timestamp, Date, time, and timestamp format specifiers</title>
		<link>http://www.w3it.org/blog/2009/07/06/timestamp-date-time-and-timestamp-format-specifiers/</link>
		<comments>http://www.w3it.org/blog/2009/07/06/timestamp-date-time-and-timestamp-format-specifiers/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 18:42:26 +0000</pubDate>
		<dc:creator>axew3</dc:creator>
				<category><![CDATA[Do you know?]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[timestamp composition]]></category>
		<category><![CDATA[timestamp explaination]]></category>
		<category><![CDATA[timestamp format]]></category>
		<category><![CDATA[timestamp how to]]></category>

		<guid isPermaLink="false">http://www.w3it.org/blog/?p=227</guid>
		<description><![CDATA[An item of type TIMESTAMP is a series of one to twenty single-byte numeric digits that reflect a specific moment. The meaning of each digit is determined by the mask that you specify when declaring the item.
The following characters are available, in order, when you specify the mask: 

yyyy
Four digits that represent the year. The [...]]]></description>
			<content:encoded><![CDATA[<p>An item of type TIMESTAMP is a series of one to twenty single-byte numeric digits that reflect a specific moment. The meaning of each digit is determined by the mask that you specify when declaring the item.</p>
<div>The following characters are available, in order, when you specify the mask: <span id="more-227"></span>
<dl>
<dt><em>yyyy</em></dt>
<dd>Four digits that represent the year. The range is 0000 to 9999.</dd>
<dt><em>MM</em></dt>
<dd>Two digits that represent the month. The range is 01 to 12. </dd>
<dt><em>dd</em></dt>
<dd>Two digits that represent the day. The range is 01 to 31.</dd>
<dt><em>HH</em></dt>
<dd>Two digits that represent the hour. The range is 00 to 23.</dd>
<dt><em>mm</em></dt>
<dd>Two digits that represent the minute. The range is 00 to 59.</dd>
<dt><em>ss</em></dt>
<dd>Two digits that represent the second. The range is 00 to 59.</dd>
<dt><em>f</em></dt>
<dd>Zero to six digits that each represent a fraction of seconds; the first represents tenths, the second represents hundreds, and so on.</dd>
</dl>
</div>
<p><strong>The default mask is <em>yyyyMMddHHmmss</em>.</strong></p>
<h3>Date, time, and timestamp format specifiers</h3>
<div>
<p>The formats<br />
of dates, times, and timestamps are specified by a pattern of letters, each<br />
representing a component of the date or time. These characters are case-sensitive,<br />
and all letters from <samp class="codeph">a</samp> to <samp class="codeph">z</samp> and from <samp class="codeph">A</samp> to <samp class="codeph">Z</samp> parse<br />
to a component of the date or time.</p>
<p>To display letters in the date, time, or timestamp without that text being<br />
parsed as a component of the date or time, enclose that letter or letters<br />
in single quotes. To display a single quote in the date, time, or timestamp,<br />
use two single quotes.</p>
<p>The following table lists the letters and their values in a date, time,<br />
or timestamp pattern.</p>
<div class="tablenoborder">
<table border="1" cellspacing="0" cellpadding="4" frame="border" rules="all">
<thead>
<tr>
<th id="d0e35" valign="top">Letter</th>
<th id="d0e37" valign="top">Date or time component</th>
<th id="d0e39" valign="top">Type</th>
<th id="d0e41" valign="top">Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="bottom">G</td>
<td valign="bottom">Era designator</td>
<td valign="bottom">Text</td>
<td valign="bottom">AD</td>
</tr>
<tr>
<td valign="bottom">y</td>
<td valign="bottom">Year</td>
<td valign="bottom">Year</td>
<td valign="bottom">1996; 96</td>
</tr>
<tr>
<td valign="bottom">M</td>
<td valign="bottom">Month in year</td>
<td valign="bottom">Month</td>
<td valign="bottom">July; Jul; 07</td>
</tr>
<tr>
<td valign="bottom">w</td>
<td valign="bottom">Week in year</td>
<td valign="bottom">Number</td>
<td valign="bottom">27</td>
</tr>
<tr>
<td valign="bottom">W</td>
<td valign="bottom">Week in month</td>
<td valign="bottom">Number</td>
<td valign="bottom">2</td>
</tr>
<tr>
<td valign="bottom">D</td>
<td valign="bottom">Day in year</td>
<td valign="bottom">Number</td>
<td valign="bottom">189</td>
</tr>
<tr>
<td valign="bottom">d</td>
<td valign="bottom">Day in month</td>
<td valign="bottom">Number</td>
<td valign="bottom">10</td>
</tr>
<tr>
<td valign="bottom">F</td>
<td valign="bottom">Day of week in month</td>
<td valign="bottom">Number</td>
<td valign="bottom">2</td>
</tr>
<tr>
<td valign="bottom">E</td>
<td valign="bottom">Day in week</td>
<td valign="bottom">Text</td>
<td valign="bottom">Tuesday; Tue</td>
</tr>
<tr>
<td valign="bottom">a</td>
<td valign="bottom">AM/PM marker</td>
<td valign="bottom">Text</td>
<td valign="bottom">PM</td>
</tr>
<tr>
<td valign="bottom">H</td>
<td valign="bottom">Hour in day (0-23)</td>
<td valign="bottom">Number</td>
<td valign="bottom">0</td>
</tr>
<tr>
<td valign="bottom">k</td>
<td valign="bottom">Hour in day (1-24)</td>
<td valign="bottom">Number</td>
<td valign="bottom">24</td>
</tr>
<tr>
<td valign="bottom">K</td>
<td valign="bottom">Hour in AM/PM (0-11)</td>
<td valign="bottom">Number</td>
<td valign="bottom">0</td>
</tr>
<tr>
<td valign="bottom">h</td>
<td valign="bottom">Hour in AM/PM (1-12)</td>
<td valign="bottom">Number</td>
<td valign="bottom">12</td>
</tr>
<tr>
<td valign="bottom">m</td>
<td valign="bottom">Minute in hour</td>
<td valign="bottom">Number</td>
<td valign="bottom">30</td>
</tr>
<tr>
<td valign="bottom">s</td>
<td valign="bottom">Second in minute</td>
<td valign="bottom">Number</td>
<td valign="bottom">55</td>
</tr>
<tr>
<td valign="bottom">S</td>
<td valign="bottom">Millisecond</td>
<td valign="bottom">Number</td>
<td valign="bottom">978</td>
</tr>
<tr>
<td valign="bottom">z</td>
<td valign="bottom">Time zone</td>
<td valign="bottom">General time zone</td>
<td valign="bottom">Pacific Standard Time; PST; GMT-08:00</td>
</tr>
<tr>
<td valign="bottom">Z</td>
<td valign="bottom">Time zone</td>
<td valign="bottom">RFC 822 time zone</td>
<td valign="bottom">-800</td>
</tr>
<tr>
<td valign="bottom">C</td>
<td valign="bottom">Century</td>
<td valign="bottom">Century</td>
<td valign="bottom">20; 21</td>
</tr>
</tbody>
</table>
</div>
<p>The number of each letter used consecutively in the pattern determines<br />
how that group of letters is interpreted and parsed. The interpretation depends<br />
on the type of letter. Also, the interpretation depends on whether the pattern<br />
is being used for formatting or parsing. The following list describes the<br />
types of letters and how different numbers of those letters affect the interpretation.</p>
<dl>
<dt class="dlterm">Text</dt>
<dd>For formatting, if the number of letters is less than 4, the full form<br />
is used. Otherwise, an abbreviation is used, if available. In parsing, both<br />
forms are accepted, independent of the number of pattern letters.</dd>
</dl>
<dl>
<dt class="dlterm">Number</dt>
<dd>For formatting, the number of pattern letters represents the minimum number<br />
of digits. Zeroes are added to shorter numbers to make them the designated<br />
length. For parsing, the number of pattern letters is ignored unless it is<br />
needed to separate two adjacent fields.</dd>
</dl>
<dl>
<dt class="dlterm">Year</dt>
<dd>For formatting, if the number of pattern letters is 2, the year is truncated<br />
to 2 digits. Otherwise, it is interpreted as the Number type.For parsing,<br />
if the number of pattern letters is not 2, the year is interpreted literally,<br />
regardless of the number of digits. For example, the pattern <samp class="codeph">MM/dd/yyyy</samp> assigned<br />
the value <samp class="codeph">01/11/12</samp> parses to January 11, 12 A.D. The same<br />
pattern assigned the value <samp class="codeph">01/02/3</samp> or <samp class="codeph">01/02/0003</samp> parses<br />
to January 2, 3 A.D. In the same way, the same pattern assigned the value <samp class="codeph">01/02/-3</samp> parses<br />
to January 2, 4 B.C.</p>
<p>For parsing, if the pattern is <samp class="codeph">yy</samp>,<br />
the parser determines the full year relative to the current year. The parser<br />
assumes that the two-digit year is within 80 years before or 20 years after<br />
the time of processing. For example, if the current year is 2004, the pattern <samp class="codeph">MM/dd/yy</samp> assigned<br />
the value <samp class="codeph">01/11/12</samp> parses to January 11, 2012, while the<br />
same pattern assigned the value <samp class="codeph">05/04/64</samp> parses to May 4,<br />
1964.</p>
</dd>
</dl>
<dl>
<dt class="dlterm">Month</dt>
<dd>If the number of pattern letters is 3 or more, the month is interpreted<br />
as the Text type. Otherwise, it is interpreted as the Number type.</dd>
</dl>
<dl>
<dt class="dlterm">General time zone</dt>
<dd>General time zones are interpreted as the Text type if they have names.<br />
For time zones representing a GMT offset value, the following syntax is used:<samp class="codeph">GMTOffsetTimeZone<br />
= GMT <em>Sign</em> <em>Hours</em> : <em>Minutes</em></samp></p>
<dl>
<dt class="dlterm">Sign</dt>
<dd>Either <samp class="codeph">+</samp> or <samp class="codeph">-</samp></dd>
</dl>
<dl>
<dt class="dlterm">Hours</dt>
<dd>A one-digit or two-digit number from 0 to 23. The format is locale independent<br />
and must be taken from the Basic Latin block of the Unicode standard.</dd>
</dl>
<dl>
<dt class="dlterm">Minutes</dt>
<dd>A two-digit number from 00 to 59. The format is locale independent and<br />
must be taken from the Basic Latin block of the Unicode standard.</dd>
</dl>
<p>For parsing, RFC 822 time zones are also accepted.</p>
</dd>
</dl>
<dl>
<dt class="dlterm">RFC 822 time zone</dt>
<dd>For formatting, the RFC 822 4-digit time zone format is used<samp class="codeph">RFC822TimeZone<br />
= <em>Sign</em> <em>TwoDigitHours</em> : <em>Minutes</em></samp></p>
<p><samp class="codeph"><em>TwoDigitHours</em></samp> must<br />
be a two-digit number from 00 to 23. The other definitions are the same as<br />
the General time zone type.</p>
<p>For parsing, General time zones are also<br />
accepted.</p>
</dd>
</dl>
<dl>
<dt class="dlterm">Century</dt>
<dd>Displayed as a Number type that shows the result of the following calculation:<br />
full year divided by 100, with the remainder ignored.</dd>
</dl>
<p>The following table lists some examples of date and time patterns interpreted<br />
in the U.S. locale.</p>
<div class="tablenoborder">
<table border="1" cellspacing="0" cellpadding="4" frame="border" rules="all">
<thead>
<tr>
<th id="d0e361" valign="top">Date and Time Pattern</th>
<th id="d0e363" valign="top">Result</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="bottom"><samp class="codeph">yyyy.MM.dd G &#8216;at&#8217; HH:mm:ss z</samp></td>
<td valign="bottom">2001.07.04 AD at 12:08:56 PDT</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">EEE, MMM d, &#8221;yy </samp></td>
<td valign="bottom">Wed, Jul 4, &#8216;01</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">h:mm a </samp></td>
<td valign="bottom">12:08 PM</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">hh &#8216;o&#8221;clock&#8217; a, zzzz </samp></td>
<td valign="bottom">12 o&#8217;clock PM, Pacific Daylight Time</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">K:mm a, z </samp></td>
<td valign="bottom">0:08 PM, PDT</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">yyyyy.MMMMM.dd GGG hh:mm aaa </samp></td>
<td valign="bottom">02001.July.04 AD 12:08 PM</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">EEE, d MMM yyyy HH:mm:ss Z </samp></td>
<td valign="bottom">Wed, 4 Jul 2001 12:08:56 -0700</td>
</tr>
<tr>
<td valign="bottom"><samp class="codeph">yyMMddHHmmssZ</samp></td>
<td valign="bottom">010704120856-0700</td>
</tr>
</tbody>
</table>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.w3it.org/blog/2009/07/06/timestamp-date-time-and-timestamp-format-specifiers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

