<?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>SamplePhpCodes.com &#187; javascript check date format</title>
	<atom:link href="http://www.samplephpcodes.com/tag/javascript-check-date-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.samplephpcodes.com</link>
	<description>Get PHP Code Help, Sample PHP Scripts,PHP Script Demos</description>
	<lastBuildDate>Mon, 05 Apr 2010 15:39:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>javascript date time format</title>
		<link>http://www.samplephpcodes.com/sample-php-codes/java-script/javascript-date-time-format/</link>
		<comments>http://www.samplephpcodes.com/sample-php-codes/java-script/javascript-date-time-format/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java Script]]></category>
		<category><![CDATA[current time using javascript]]></category>
		<category><![CDATA[display date using javascript]]></category>
		<category><![CDATA[format date using javascript]]></category>
		<category><![CDATA[getmonth java script]]></category>
		<category><![CDATA[gettime java script]]></category>
		<category><![CDATA[java script date time]]></category>
		<category><![CDATA[java script date time picker]]></category>
		<category><![CDATA[java script getdate]]></category>
		<category><![CDATA[javascript check date format]]></category>
		<category><![CDATA[javascript date parse format]]></category>
		<category><![CDATA[javascript date time format]]></category>
		<category><![CDATA[javascript date time string]]></category>
		<category><![CDATA[javascript tutorial date time]]></category>
		<category><![CDATA[mm dd yyyy format javascript]]></category>

		<guid isPermaLink="false">http://samplephpcodes.com/?p=89</guid>
		<description><![CDATA[This is a simple javascript date time format functions. &#60;script type=&#34;text/javascript&#34;&#62; var formatDate = function (formatDate, formatString) { if(formatDate instanceof Date) { var months = new Array(&#34;Jan&#34;,&#34;Feb&#34;,&#34;Mar&#34;,&#34;Apr&#34;,&#34;May&#34;,&#34;Jun&#34;,&#34;Jul&#34;,&#34;Aug&#34;,&#34;Sep&#34;,&#34;Oct&#34;,&#34;Nov&#34;,&#34;Dec&#34;); var yyyy = formatDate.getFullYear(); var yy = yyyy.toString().substring(2); var m = formatDate.getMonth(); var mm = m &#60; 10 ? &#34;0&#34; + m : m; var mmm = months[m]; [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple javascript date time format functions.</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
var formatDate = function (formatDate, formatString) {
	if(formatDate instanceof Date) {
		var months = new Array(&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;);
		var yyyy = formatDate.getFullYear();
		var yy = yyyy.toString().substring(2);
		var m = formatDate.getMonth();
		var mm = m &lt; 10 ? &quot;0&quot; + m : m;
		var mmm = months[m];
		var d = formatDate.getDate();
		var dd = d &lt; 10 ? &quot;0&quot; + d : d;

		var h = formatDate.getHours();
		var hh = h &lt; 10 ? &quot;0&quot; + h : h;
		var n = formatDate.getMinutes();
		var nn = n &lt; 10 ? &quot;0&quot; + n : n;
		var s = formatDate.getSeconds();
		var ss = s &lt; 10 ? &quot;0&quot; + s : s;

		formatString = formatString.replace(/yyyy/i, yyyy);
		formatString = formatString.replace(/yy/i, yy);
		formatString = formatString.replace(/mmm/i, mmm);
		formatString = formatString.replace(/mm/i, mm);
		formatString = formatString.replace(/m/i, m);
		formatString = formatString.replace(/dd/i, dd);
		formatString = formatString.replace(/d/i, d);
		formatString = formatString.replace(/hh/i, hh);
		formatString = formatString.replace(/h/i, h);
		formatString = formatString.replace(/nn/i, nn);
		formatString = formatString.replace(/n/i, n);
		formatString = formatString.replace(/ss/i, ss);
		formatString = formatString.replace(/s/i, s);

		return formatString;
	} else {
		return &quot;&quot;;
	}
}
&lt;/pre&gt;

This will  show a demo date 

&lt;pre lang=&quot;javascript&quot;&gt;
alert(formatDate(new Date(), &quot;d mmm yyyy hh:nn:ss&quot;));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.samplephpcodes.com/sample-php-codes/java-script/javascript-date-time-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
