Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#10554 closed defect (fixed)

[patch][test][cla] dojo.date.locale not handling double-single quotes correctly

Reported by: Nathan Toone Owned by: Adam Peller
Priority: high Milestone: 1.5
Component: Date Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

It should replace double-single quotes with a single quote - for example, adding the following to the dojo/tests/date/locale.js test case

t.is("12 o'clock AM", dojo.date.locale.format(date, {datePattern:"hh 'o''clock' a", selector:"date"}));

causes it to fail with the error:

expected
		12 o'clock AM
	but got
		12 o''clock AM

Attachments (2)

dateSingleQuote.diff (1018 bytes) - added by Nathan Toone 10 years ago.
Test case and fix
locale.patch (671 bytes) - added by youngho 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by Nathan Toone

Attachment: dateSingleQuote.diff added

Test case and fix

comment:1 Changed 10 years ago by Nathan Toone

Summary: dojo.date.locale not handling double-single quotes correctly[patch][test][cla] dojo.date.locale not handling double-single quotes correctly

comment:2 Changed 10 years ago by Adam Peller

Component: InternationalizationDate

comment:3 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [21282]) correct handling of double single-quotes. Fixes #10554. Thanks, toonetown

comment:4 Changed 9 years ago by Adam Peller

Milestone: tbd1.5

comment:5 Changed 9 years ago by Adam Peller

(In [21283]) Uncomment test cases that no longer fail. Refs #10554

Changed 9 years ago by youngho

Attachment: locale.patch added

comment:6 Changed 9 years ago by youngho

The test should be set the locale for non English environment.

comment:7 Changed 9 years ago by Adam Peller

(In [21285]) Set locale to 'en' on test. Good catch, youngho! Refs #10554

Note: See TracTickets for help on using tickets.