<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Format Twitter &#8216;created_at&#8217; Date with Javascript</title>
	<atom:link href="http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/</link>
	<description>The personal writings &#38; experiments of Stephen Braitsch</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:15:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Hal</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-392</link>
		<dc:creator>Hal</dc:creator>
		<pubDate>Thu, 14 Apr 2011 06:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-392</guid>
		<description>@BRENEN - great code; thanks for sharing. I&#039;m no regex expert, but I was able to get it working in Safari by running two expressions - one to grab everything after the time, then another to move the time zone to then end to satisfy the datetime format issue for the date object. I&#039;m sure someone that knows what they are doing could combine the two into one regex:

function parseTwitterDate(text) {
 //running regex to grab everything after the time
 var newtext = text.replace(/(\d{1,2}[:]\d{2}[:]\d{2}) (.*)/, &#039;$2 $1&#039;);
 //moving the time code to the end
 newtext = newtext.replace(/(\+\S+) (.*)/, &#039;$2 $1&#039;)
 var date = new Date(Date.parse(newtext)).toLocaleDateString();
 var time = new Date(Date.parse(newtext)).toLocaleTimeString();
 return date;
 }</description>
		<content:encoded><![CDATA[<p>@BRENEN &#8211; great code; thanks for sharing. I&#8217;m no regex expert, but I was able to get it working in Safari by running two expressions &#8211; one to grab everything after the time, then another to move the time zone to then end to satisfy the datetime format issue for the date object. I&#8217;m sure someone that knows what they are doing could combine the two into one regex:</p>
<p>function parseTwitterDate(text) {<br />
 //running regex to grab everything after the time<br />
 var newtext = text.replace(/(\d{1,2}[:]\d{2}[:]\d{2}) (.*)/, &#8216;$2 $1&#8242;);<br />
 //moving the time code to the end<br />
 newtext = newtext.replace(/(\+\S+) (.*)/, &#8216;$2 $1&#8242;)<br />
 var date = new Date(Date.parse(newtext)).toLocaleDateString();<br />
 var time = new Date(Date.parse(newtext)).toLocaleTimeString();<br />
 return date;<br />
 }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-381</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Thu, 17 Feb 2011 04:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-381</guid>
		<description>@BRENEN when I use your code this is the result;

December -2147483629, 1969 -8:-31:-23 GMT-05:00 

Not Sunday, January 31, 2010 • 4:01:53 PM</description>
		<content:encoded><![CDATA[<p>@BRENEN when I use your code this is the result;</p>
<p>December -2147483629, 1969 -8:-31:-23 GMT-05:00 </p>
<p>Not Sunday, January 31, 2010 • 4:01:53 PM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uddy</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-376</link>
		<dc:creator>Uddy</dc:creator>
		<pubDate>Tue, 01 Feb 2011 16:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-376</guid>
		<description>@BRENEN – works perfectly. thanks for sharing</description>
		<content:encoded><![CDATA[<p>@BRENEN – works perfectly. thanks for sharing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kylie rose</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-336</link>
		<dc:creator>kylie rose</dc:creator>
		<pubDate>Thu, 09 Sep 2010 04:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-336</guid>
		<description>@BRENEN - your script works perfectly. thanks for sharing!</description>
		<content:encoded><![CDATA[<p>@BRENEN &#8211; your script works perfectly. thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: loige</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-297</link>
		<dc:creator>loige</dc:creator>
		<pubDate>Thu, 13 May 2010 15:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-297</guid>
		<description>@BRENEN
Your last submission does not seems to work on safari for windows :S</description>
		<content:encoded><![CDATA[<p>@BRENEN<br />
Your last submission does not seems to work on safari for windows :S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brenen</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-253</link>
		<dc:creator>Brenen</dc:creator>
		<pubDate>Sun, 31 Jan 2010 22:10:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-253</guid>
		<description>oops..
function parseTwitterDate(text) {
var newtext = text.replace(/(\+\S+) (.*)/, ‘$2 $1′)
var date = new Date(Date.parse(newtext)).toLocaleDateString();
var time = new Date(Date.parse(newtext)).toLocaleTimeString();
return date +’ • ‘ + time;
}</description>
		<content:encoded><![CDATA[<p>oops..<br />
function parseTwitterDate(text) {<br />
var newtext = text.replace(/(\+\S+) (.*)/, ‘$2 $1′)<br />
var date = new Date(Date.parse(newtext)).toLocaleDateString();<br />
var time = new Date(Date.parse(newtext)).toLocaleTimeString();<br />
return date +’ • ‘ + time;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brenen</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-252</link>
		<dc:creator>Brenen</dc:creator>
		<pubDate>Sun, 31 Jan 2010 22:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-252</guid>
		<description>This does not work at all.. It returns things like &#039;Thursday, J • anuar PM&#039; and &#039;NaN • Na PM&#039; in IE. These are just from your Recent Twitter side bar thing. The problem is that toLocaleString makes it into full month and day names. The IE problem is because twitter&#039;s format isn&#039;t in standard javascript format. I made a little thing just to make it function, if you want to take the seconds off and such, go ahead.

function parseTwitterDate(text) {
var newtext = text.replace(/(\+\S+) (.*)/, &#039;$2 $1&#039;)		
var date = new Date(Date.parse(text)).toLocaleDateString();
var time = new Date(Date.parse(text)).toLocaleTimeString();
return date +&#039; • &#039; + time;
}

returns Sunday, January 31, 2010 • 4:01:53 PM</description>
		<content:encoded><![CDATA[<p>This does not work at all.. It returns things like &#8216;Thursday, J • anuar PM&#8217; and &#8216;NaN • Na PM&#8217; in IE. These are just from your Recent Twitter side bar thing. The problem is that toLocaleString makes it into full month and day names. The IE problem is because twitter&#8217;s format isn&#8217;t in standard javascript format. I made a little thing just to make it function, if you want to take the seconds off and such, go ahead.</p>
<p>function parseTwitterDate(text) {<br />
var newtext = text.replace(/(\+\S+) (.*)/, &#8216;$2 $1&#8242;)<br />
var date = new Date(Date.parse(text)).toLocaleDateString();<br />
var time = new Date(Date.parse(text)).toLocaleTimeString();<br />
return date +&#8217; • &#8216; + time;<br />
}</p>
<p>returns Sunday, January 31, 2010 • 4:01:53 PM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Braitsch</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-249</link>
		<dc:creator>Stephen Braitsch</dc:creator>
		<pubDate>Thu, 28 Jan 2010 23:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-249</guid>
		<description>Then all you want is the &#039;text&#039; property of the &#039;status&#039; node. 
For example look here:
http://twitter.com/statuses/user_timeline/braitsch.xml?count=3
statuses -&gt; status -&gt; text
or something like this in actionscript.
var list:XMLList = statuses.status;
var tweet:String = list[0].text; 
will return the text of the first tweet in the list.</description>
		<content:encoded><![CDATA[<p>Then all you want is the &#8216;text&#8217; property of the &#8216;status&#8217; node.<br />
For example look here:<br />
<a href="http://twitter.com/statuses/user_timeline/braitsch.xml?count=3" rel="nofollow">http://twitter.com/statuses/user_timeline/braitsch.xml?count=3</a><br />
statuses -> status -> text<br />
or something like this in actionscript.<br />
var list:XMLList = statuses.status;<br />
var tweet:String = list[0].text;<br />
will return the text of the first tweet in the list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annie</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-248</link>
		<dc:creator>Annie</dc:creator>
		<pubDate>Thu, 28 Jan 2010 22:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-248</guid>
		<description>What if you want to get rid of the created date completely?  I am creating a twitter feed for my website and would like to just show the text of my tweet and nothing else.

Thanks!</description>
		<content:encoded><![CDATA[<p>What if you want to get rid of the created date completely?  I am creating a twitter feed for my website and would like to just show the text of my tweet and nothing else.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Braitsch</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-185</link>
		<dc:creator>Stephen Braitsch</dc:creator>
		<pubDate>Tue, 05 Jan 2010 20:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-185</guid>
		<description>You don&#039;t. If you wanted to parse a Twitter feed with AS3 you&#039;d request the feed from Flash and write a separate but similar function to handle the result. I&#039;d probably use a regular expression to parse the returned XML date string since the AS3 date object lacks the JS date methods shown in the example above.</description>
		<content:encoded><![CDATA[<p>You don&#8217;t. If you wanted to parse a Twitter feed with AS3 you&#8217;d request the feed from Flash and write a separate but similar function to handle the result. I&#8217;d probably use a regular expression to parse the returned XML date string since the AS3 date object lacks the JS date methods shown in the example above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.quietless.com/kitchen/format-twitter-created_at-date-with-javascript/comment-page-1/#comment-184</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Tue, 05 Jan 2010 20:15:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=360#comment-184</guid>
		<description>how do you call and use this from as3?</description>
		<content:encoded><![CDATA[<p>how do you call and use this from as3?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

