<?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: JavaScript ISO8601/RFC3339 Date Parser</title>
	<atom:link href="http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/</link>
	<description>Web Design, Javascript, CSS, and More...</description>
	<lastBuildDate>Sat, 06 Mar 2010 12:45:08 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jordan</title>
		<link>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/comment-page-1/#comment-17567</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Sat, 18 Apr 2009 03:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/#comment-17567</guid>
		<description>Try this simplification of lines 3 thru 8:

var d, regexp = /(dddd)(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z&#124;([+-])(dd)(:)?(dd))/;

if ((d = dString.toString().match(regexp))) {

You can perform an assignment within an if statement condition expression (or within any other expression) if you simply add a layer of parentheses; the assigned value becomes the value of the parenthetical expression. In some cases, this simplifies logic, while in other cases (like this one) it avoids redundant computations. (What you cannot do within the if condition is declare the var.) And there is no need to declare a new RegExp object: for the match method: the original object will do just fine. 

A related tip is that you can perform multiple assignments within the initialization, test and increment terms of a for statement, merely by delimiting them with commas. In the case of the test term, it is important to remember that the value of the LAST (rightmost) delimited expression or assignment will be the value used for the test. Thus:

for (i=0,k=4; z=k*i,i&lt;limit; j++, k--) { ...</description>
		<content:encoded><![CDATA[<p>Try this simplification of lines 3 thru 8:</p>
<p>var d, regexp = /(dddd)(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)(:)?(dd)(.d+)?(Z|([+-])(dd)(:)?(dd))/;</p>
<p>if ((d = dString.toString().match(regexp))) {</p>
<p>You can perform an assignment within an if statement condition expression (or within any other expression) if you simply add a layer of parentheses; the assigned value becomes the value of the parenthetical expression. In some cases, this simplifies logic, while in other cases (like this one) it avoids redundant computations. (What you cannot do within the if condition is declare the var.) And there is no need to declare a new RegExp object: for the match method: the original object will do just fine. </p>
<p>A related tip is that you can perform multiple assignments within the initialization, test and increment terms of a for statement, merely by delimiting them with commas. In the case of the test term, it is important to remember that the value of the LAST (rightmost) delimited expression or assignment will be the value used for the test. Thus:</p>
<p>for (i=0,k=4; z=k*i,i&lt;limit; j++, k&#8211;) { &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Carter</title>
		<link>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/comment-page-1/#comment-3333</link>
		<dc:creator>David Carter</dc:creator>
		<pubDate>Fri, 16 Jan 2009 00:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/#comment-3333</guid>
		<description>Thanks, it helped with an Atom feed I am playing around with!</description>
		<content:encoded><![CDATA[<p>Thanks, it helped with an Atom feed I am playing around with!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
