-
2 Oct 2012 10:32 AM #1
Ext.Date.parse returns undefined
Ext.Date.parse returns undefined
Hi,
I'm not sure Why I'm receiving undefined after parsing a valid date:
Seems Ext.Date.parse using "c" format requires the full version of the time offset: -0400 or -04:00.Code:// Returns a correct date: Ext.Date.parse("2012-10-02 03:10:04-0400", "c"); Ext.Date.parse("2012-10-02 03:10:04-04:00", "c") // Returns undefined Ext.Date.parse("2012-10-02 03:10:04-04", "c");
Why not -04 ?
By the way. I'm using Sencha Touch 2.0.1
-
2 Oct 2012 10:59 AM #2
Another comment to add.
Based on the documentation or the API: http://docs.sencha.com/touch/2-0/#!/api/Ext.Date.
"c" format is based on ISO 8601.
Based on the Wiki about ISO 8601 about the offset (http://en.wikipedia.org/wiki/ISO_8601).
it says: "The offset from UTC is given in the format ±[hh]:[mm], ±[hh][mm], or ±[hh]"
-
3 Oct 2012 10:28 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Thanks for the report! I have opened a bug in our bug tracker.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote