开发者

Date.js culture info is confusing me

开发者 https://www.devze.com 2023-01-08 04:04 出处:网络
I\'m including date.js (from datejs.com) and the en-IE culture info script. If I call alert(Date.CultureInfo.dateElementOrder) I see the correct dmy, but if I try to interpret the date 02/03/01 I get

I'm including date.js (from datejs.com) and the en-IE culture info script.

If I call alert(Date.CultureInfo.dateElementOrder) I see the correct dmy, but if I try to interpret the date 02/03/01 I get 3 Jan 2001 and not 2 Feb 2001. I'm not sure whether this is a bug in date.js or a problem with 开发者_如何学运维me.


The documentation was confusing me (or I hadn't read it right).

I thought I should include date.js and en-IE.js. In fact, the right thing to do is to include date-en-IE.js, a file I hadn't even noticed existed before.

As usual with datejs, the downloadable file on the front of the site is a year or so out of date, but a live version exists if you dig for it in the svn trunk.

0

精彩评论

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