开发者

Date.toLocaleString() broken in Chrome?

开发者 https://www.devze.com 2022-12-17 13:38 出处:网络
Date.toLocaleString() returns this in Chrome: Mon Jan 18 2010 16:47:42 GMT+1100 (AUS Eastern Daylight Time)

Date.toLocaleString() returns this in Chrome:

  • Mon Jan 18 2010 16:47:42 GMT+1100 (AUS Eastern Daylight Time)

In firefox, it's this:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消