Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#12155 closed defect (fixed)

dojo.date.local.format ignores am/pm options

Reported by: Bryan Forbes Owned by: Adam Peller
Priority: high Milestone: 1.5.1
Component: Date Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

The following code should use "am" and "pm" instead of "AM" and "PM" in the en-us locale:

console.log(dojo.date.locale.format(new Date(), {
    datePattern: "dd/MM/yyyy",
    timePattern: "hh:mma",
    am: "am",
    pm: "pm
}));

Line 80 of date/locale.js needs to change to the following in order to support the am/pm options again:

s = options[timePeriod] || bundle['dayPeriods-format-wide-' + timePeriod];

Change History (2)

comment:1 Changed 8 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [23886]) Applying Bryan's patch to fix am/pm overrides. Fixes #12155

comment:2 Changed 8 years ago by Adam Peller

also applied to trunk for 1.6: [23885]

Note: See TracTickets for help on using tickets.