Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#17342 closed defect (duplicate)

[regression] fails when locale is en_us

Reported by: babynus Owned by: Adam Peller
Priority: undecided Milestone: tbd
Component: Date Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:


This code:"2013-12-31 12:00:00", {datePattern: "yyyy-MM-dd", timePattern: "HH:mm:ss", selector: "date and time"});

returns null when locale is en_us In most other cases (en_uk, fr_fr, ...) is correctly returns a date.

This code was working fine up until 1.8.4. It fails since 1.9.0 and still fails in 1.9.1

Change History (3)

comment:1 Changed 9 years ago by bill

Component: GeneralDate
Owner: set to Adam Peller
Status: newassigned
Summary: fails when locale is en_us[regression] fails when locale is en_us

After loading http://localhost/trunk/util/doh/runner.html?test=dojo/tests/date, I run:

require(["dojo/date/locale"], function(locale){
   console.log(locale.parse("2013-12-31 12:00:00", {datePattern: "yyyy-MM-dd", timePattern: "HH:mm:ss", selector: "date and time"})); 

I reproduce the change in behavior, which starts at 26d869b197d47fc49a154a735b23855aa5ab6076, usage of the 2.1 CLDR

comment:2 Changed 9 years ago by Adam Peller

Resolution: duplicate
Status: assignedclosed

Duplicate of #16733.
dup of #16733

comment:3 Changed 9 years ago by Adam Peller

I suggest doing a replace(" ", "T") and using instead. It's locale-neutral and faster.

Note: See TracTickets for help on using tickets.