Closed Bug 386772 Opened 17 years ago Closed 17 years ago

datepicker should use iso format for dates

Categories

(Toolkit :: UI Widgets, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: enndeakin, Assigned: enndeakin)

Details

Attachments

(1 file)

Currently yyyy/mm/dd is used, but yyyy-mm-dd should be used
Also includes general datepicker/timepicker testcases.
Attachment #270809 - Flags: review?(gavin.sharp)
Comment on attachment 270809 [details] [diff] [review]
change to use hyphens as separators

>Index: toolkit/content/tests/widgets/test_datepicker.xul
>Index: toolkit/content/tests/widgets/test_timepicker.xul

These comments apply to both files:

>+  var setTimeField = function(field, value, expectException,
>+                              expectedHour, expectedMinute, expectedSecond)

nit: Use function setTimeField() {} here, that way the function object has a name for debugging purposes.

>+function testtag_comparetime(tp, testid, hour, minute, second)
>+{

>+  is(dateValue.getHours() == hour &&
>+                dateValue.getMinutes() == minute &&
>+                dateValue.getSeconds() == second,
>+                true, testid + " dateValue");

nit: Use ok() here?
Attachment #270809 - Flags: review?(gavin.sharp) → review+
I had to disable the tests added here because they were causing trouble on the windows unit test box. See bug 389616.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
(In reply to comment #1)
> Created an attachment (id=270809) [details]
> change to use hyphens as separators
> 
> Also includes general datepicker/timepicker testcases.
> 

For the record, it looks like this patch changes not just the way the datepicker's displayed but also the format of the contents of the "value" attribute and "value" property.

This patch changes the value property/attribute to use '-' instead of '/'. It doesn't change the displayed value at all.
Flags: in-testsuite+
No longer blocks: 509594
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: