<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Date Formatting bug with JSON Date</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Date Formatting bug with JSON Date</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date#p18937</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date#p18937</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for 1,2 and 4. Fixed.</p>
<p>The 3) is not true. below these lines later we decrement the mouth value.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 03 Aug 2010 12:12:50 +0300</pubDate>
        </item>
        <item>
        	<title>nomad513 on Date Formatting bug with JSON Date</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date#p18818</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/date-formatting-bug-with-json-date#p18818</guid>
        	        	<description><![CDATA[<p>My dates are being returned from the server via JSON in this format: &#160;"March, 31 2009 14:41:25"</p>
<p>I setup the formatoptions.srcformat on my date column as &#39;F, d Y H:i:s&#39; and the formatoptions.newformat as &#39;m/d/Y&#39;</p>
<p>My result is 01/31/2009, but should be 03/31/2009.</p>
<p>I have tracked the issue down to the jquery.fmatter.js file, lines 110 - 126. &#160;I found several issues.</p>
<p>1) Line 110 &#38; 111: The regex for date &#38; format variables does not account for a comma. &#160;Adding \, seems to address this.</p>
<p>2) Line 119 &#38; 120: Nothing ever uses the &#39;dM&#39; variable. &#160;I altered this to instead set the result to &#39;date[k]&#39;.</p>
<p>3) Line 120: Adding +1 to the numeric month gives incorrect result. &#160;JS months are zero based 0-11. &#160;I removed the +1.</p>
<p>4) Line 126: In my format, I did not use &#39;m&#39;, I used &#39;F&#39;. &#160;There is no code to set &#39;m&#39; from &#39;F&#39; once the numeric month has been determined. &#160;I added a line before this of &#39;if (ts.f) {ts.m = ts.f;}&#39;.</p>
<p>Making these 4 alterations addresses the issue I found.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Mon, 26 Jul 2010 18:08:09 +0300</pubDate>
        </item>
</channel>
</rss>