#8753 closed defect (fixed)
dojox.date.tests.strftime failure
Reported by: | Adam Peller | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dojox | Version: | 1.3.0b1 |
Keywords: | Cc: | Tom Trenka, [email protected]… | |
Blocked By: | Blocking: |
Description
Tested on FF3/Mac and Chrome/Win?
GROUP "dojox.date.tests.posix" has 5 tests to run Error: Bundle not found: gregorian in dojo.cldr , locale=en ERROR IN: (function test_date_strftime(t) {var date = new Date(2006, 7, 11, 0, 55, 12, 3456);t.is("06/08/11", dojox.date.posix.strftime(date, "%y/%m/%d"));var dt = null;var fmt = "";var res = "";dt = new Date(2006, 0, 1, 18, 23);fmt = "%a";res = "Sun";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%A";res = "Sunday";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%b";res = "Jan";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%B";res = "January";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%c";res = "Sunday, January 1, 2006 6:23:00 PM";t.is(res, dojox.date.posix.strftime(dt, fmt).substring(0, res.length));fmt = "%C";res = "20";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%d";res = "01";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%D";res = "01/01/06";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%e";res = " 1";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%h";res = "Jan";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%H";res = "18";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%I";res = "06";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%j";res = "001";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%k";res = "18";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%l";res = " 6";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%m";res = "01";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%M";res = "23";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%p";res = "PM";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%r";res = "06:23:00 PM";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%R";res = "18:23";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%S";res = "00";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%T";res = "18:23:00";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%u";res = "7";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%w";res = "0";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%x";res = "Sunday, January 1, 2006";t.is(res, dojox.date.posix.strftime(dt, fmt, "en"));fmt = "%X";res = "6:23:00 PM";t.is(res, dojox.date.posix.strftime(dt, fmt, "en").substring(0, res.length));fmt = "%y";res = "06";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%Y";res = "2006";t.is(res, dojox.date.posix.strftime(dt, fmt));fmt = "%%";res = "%";t.is(res, dojox.date.posix.strftime(dt, fmt));}) FAILED test: test_date_strftime 4 ms PASSED test: test_date_getStartOfWeek 1 ms PASSED test: test_date_setIsoWeekOfYear 2 ms PASSED test: test_date_getIsoWeekOfYear 1 ms PASSED test: test_date_getIsoWeeksInYear 13 ms
Change History (6)
comment:1 Changed 12 years ago by
Owner: | changed from Neil Roberts to Adam Peller |
---|
comment:2 Changed 12 years ago by
I thought you had some dependency on the posix code and requested that it be ported. Is it not used anywhere?
Also, you're the project owner for dojox.date, and psowden is not an active contributor.
comment:3 Changed 12 years ago by
I don't use it anywhere. I don't know why I'm the project owner. Why do you mention psowden? Did he write the original code? Who changed the code that made this module break?
comment:4 Changed 12 years ago by
Cc: | Tom Trenka [email protected]… added |
---|
Take a look at dojox/date/README. You authored the php module, psowden, I think authored the posix code, and I thought you were using it for dtl at one time, but I guess you're just using php. I wasn't a huge fan of competing date formats, but I remember you stating a case for it and the creation of this project.
I don't know when this regressed, but I believe I ran these tests successfully for the 1.2 release. It seems that maybe the HebrewDate? code set the locale improperly and the posix test didn't explicitly load the locale-sensitive info as it should have.
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 12 years ago by
Milestone: | tbd → 1.3 |
---|
batch move of tickets marked 'tbd' fixed in the 1.3 timeframe
Not sure why this was assigned to me. I wrote the PHP bundle, not the posix bundle