Closed
Bug 459844
Opened 16 years ago
Closed 7 years ago
toLocaleFormat/PRMJ_FormatTime/strftime don't support "%e" on Windows
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 818634
People
(Reporter: steffen.wilberg, Unassigned)
References
(Blocks 1 open bug)
Details
toLocaleFormat/PRMJ_FormatTime/strftime don't support "%e" (one- or two-digit day: 1-31) on Windows. "%d" (two-digit day: 01-31) works though.
alert(new Date().toLocaleFormat("%B %e"));
RESULT: Tue Oct 9 2008 17:21:00 GMT +0200
EXPECTED: Oktober 9.
alert(new Date().toLocaleFormat("%B %d"));
RESULT: Oktober 09 (as expected).
This is because PRMJ_FormatTime fails here:
http://hg.mozilla.org/mozilla-central/annotate/9cf56b1047d4/js/src/jsdate.cpp#l1783
And this is because strftime doesn't support "%e" on Windows:
http://msdn.microsoft.com/en-us/library/fe06s4ak%28VS.80%29.aspx
Can we work around this in PRMJ_FormatTime by using %d and stripping any leading zeroes?
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 1•7 years ago
|
||
toLocaleFormat was removed in bug 818634.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•