Date.toLocaleString() returns this in Chrome:
- Mon Jan 18 2010 16:47:42 GMT+1100 (AUS Eastern Daylight Time)
In firefox, it's this:
- Mon开发者_JAVA百科day, 18 January 2010 4:47:42 PM
Browser version doesn't seem to matter. Anyone have a suggestion on this one?
Date.toLoacaleString is an issue on chrome:
http://code.google.com/p/chromium/issues/detail?id=29779&q=tolocalestring&colspec=ID%20Stars%20Pri%20Area%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS
As CMS answered above, these methods can return pretty much anything they want, hopefully in a representation that is readable to someone in that locale (language + cultural conventions) To obtain a particular formatting of a Date, you need to use a library like DateJS or Dojo.
精彩评论