<?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>Software Warlock &#187; date formatting</title>
	<atom:link href="http://softwareblog.morlok.net/tag/date-formatting/feed/" rel="self" type="application/rss+xml" />
	<link>http://softwareblog.morlok.net</link>
	<description></description>
	<lastBuildDate>Sat, 24 Dec 2011 16:06:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Cocoa Date Formats</title>
		<link>http://softwareblog.morlok.net/2009/01/01/cocoa-date-formats/</link>
		<comments>http://softwareblog.morlok.net/2009/01/01/cocoa-date-formats/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 18:28:55 +0000</pubDate>
		<dc:creator>Warlock</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[date formatting]]></category>
		<category><![CDATA[NSCalendarDate]]></category>
		<category><![CDATA[NSDate]]></category>

		<guid isPermaLink="false">http://softwareblog.morlok.net/?p=56</guid>
		<description><![CDATA[.graybox { border-top: 1px solid #919699; border-left: 1px solid #919699; } .graybox th { padding: 4px 8px 4px 8px; background: #E2E2E2; font-size: 12px; border-bottom: 1px solid #919699; border-right: 1px solid #919699; } .graybox th p { font-weight: bold; margin-bottom: 0px; &#8230;<p class="read-more"><a href="http://softwareblog.morlok.net/2009/01/01/cocoa-date-formats/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.graybox {
	border-top: 1px solid #919699;
	border-left: 1px solid #919699;
	}</p>
<p>.graybox th {
	padding: 4px 8px 4px 8px;
	background: #E2E2E2;
	font-size: 12px;
	border-bottom: 1px solid #919699;
	border-right: 1px solid #919699;
	}
.graybox th p {
	font-weight: bold;
	margin-bottom: 0px; 
	}</p>
<p>.graybox td {
	padding: 8px;
	font-size: 12px;
	vertical-align: top;
	border-bottom: 1px solid #919699;
	border-right: 1px solid #919699;
	}
.graybox td p {
	margin-bottom: 0px; 
	}
.graybox td p + p  {
	margin-top: 5px; 
	}
.graybox td p + p + p {
	margin-top: 5px; 
	}
</style>
<p>I&#8217;m posting this here mostly for quick personal reference.  Below is the date format strings used by <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSCalendarDate_Class/Reference/Reference.html">NSCalendarDate</a> this information was taken from <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/DatesAndTimes/Articles/dtDatesToStrings.html#//apple_ref/doc/uid/20000187-BBCIECEH">here</a>.</p>
<table class="graybox" border = "0" cellspacing="0" cellpadding="5">
<tr>
<th scope="col" align="left" style="font-weight: bold" bgcolor="#CCCCCC">
<p>Conversion Specifier</p>
</th>
<th scope="col" align="left" style="font-weight: bold" bgcolor="#CCCCCC">
<p>Description</p>
</th>
</tr>
<tr>
<td  scope="row">
<p>%%</p>
</td>
<td >
<p>a &#8216;%&#8217; character</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%a</p>
</td>
<td >
<p>abbreviated weekday name</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%A</p>
</td>
<td >
<p>full weekday name</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%b</p>
</td>
<td >
<p>abbreviated month name</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%B</p>
</td>
<td >
<p>full month name</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%c</p>
</td>
<td >
<p>shorthand for %X %x, the locale format for date and time</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%d</p>
</td>
<td >
<p>day of the month as a decimal number (01-31) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%e</p>
</td>
<td >
<p>same as %d but does not print the leading 0 for days 1 through 9</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%F</p>
</td>
<td >
<p>milliseconds as a decimal number (000-999)</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%H</p>
</td>
<td >
<p>hour based on a 24-hour clock as a decimal number (00-23) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%I</p>
</td>
<td >
<p>hour based on a 12-hour clock as a decimal number (01-12)</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%j</p>
</td>
<td >
<p>day of the year as a decimal number (001-366) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%m</p>
</td>
<td >
<p>month as a decimal number (01-12) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%M</p>
</td>
<td >
<p>minute as a decimal number (00-59) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%p</p>
</td>
<td >
<p>AM/PM designation for the locale</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%S</p>
</td>
<td >
<p>second as a decimal number (00-59) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%w</p>
</td>
<td >
<p>weekday as a decimal number (0-6), where Sunday is 0</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%x</p>
</td>
<td >
<p>date using the date representation for the locale</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%X</p>
</td>
<td >
<p>time using the time representation for the locale</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%y</p>
</td>
<td >
<p>year without century (00-99) </p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%Y</p>
</td>
<td >
<p>year with century (such as 1990)</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%Z</p>
</td>
<td >
<p>time zone name (such as Pacific Daylight Time)</p>
</td>
</tr>
<tr>
<td  scope="row">
<p>%z</p>
</td>
<td >
<p>time zone offset in hours and minutes from GMT (HHMM)</p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://softwareblog.morlok.net/2009/01/01/cocoa-date-formats/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WTF Date Formats</title>
		<link>http://softwareblog.morlok.net/2008/10/27/wtf-date-formats/</link>
		<comments>http://softwareblog.morlok.net/2008/10/27/wtf-date-formats/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 15:13:55 +0000</pubDate>
		<dc:creator>Warlock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[date formatting]]></category>

		<guid isPermaLink="false">http://softwareblog.morlok.net/2008/10/27/wtf-date-formats/</guid>
		<description><![CDATA[As I&#8217;ve mentioned previously, I spend a lot of time dealing with date/time localization issues. As such, this entry from the Daily WTF was extremely applicable to me. I could post some stuff that would make this code look like &#8230;<p class="read-more"><a href="http://softwareblog.morlok.net/2008/10/27/wtf-date-formats/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve mentioned previously, I spend a lot of time dealing with date/time localization issues.  As such, this <a href="http://thedailywtf.com/Articles/Extensive-Date-Parsing.aspx">entry</a> from <a href="http://thedailywtf.com/">the Daily WTF</a> was extremely applicable to me.</p>
<p>I could post some stuff that would make this code look like a good idea, but I&#8217;m pretty sure that would be frowned upon.</p>
]]></content:encoded>
			<wfw:commentRss>http://softwareblog.morlok.net/2008/10/27/wtf-date-formats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

