Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14969 closed defect (fixed)

dojox.date.*.locale prints console noise when empty string is passed

Reported by: Rob Retchless Owned by: Adam Peller
Priority: undecided Milestone: 1.6.2
Component: Dojox Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

dojox.date.*.locale should behave just like dojo.date.locale with the same input. This is not the case with falsy input.

At the moment, here's the behavior:

dojo.date.locale.parse() returns null. dojo.date.locale.parse("") returns null. dojox.date.buddhist.locale.parse() throws an exception. dojox.date.buddhist.locale.parse("") returns null, but spews console noise about invalid format dojox.date.islamic.locale.parse() throws an exception. dojox.date.islamic.locale.parse("") returns null, but spews console noise about invalid format dojox.date.hebrew.locale.parse() throws an exception. dojox.date.hebrew.locale.parse("") returns null, but spews console noise about invalid format

These dojox locale classes should not print to the console for falsy input.

Attachments (1)

14969.patch (1.3 KB) - added by Adam Peller 10 years ago.
patch from retchless (IBM, CCLA)

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by Adam Peller

I would prefer that we patch the dojox.date code so that it matches dojo.date which has no console.debug (also in better compliance with the style guide)

Changed 10 years ago by Adam Peller

Attachment: 14969.patch added

patch from retchless (IBM, CCLA)

comment:2 Changed 10 years ago by Adam Peller

Resolution: fixed
Status: newclosed

In [28106]:

Remove debug message. Fixes #14969

comment:3 Changed 10 years ago by Adam Peller

Component: InternationalizationDojox
Milestone: tbd1.8

comment:4 Changed 10 years ago by haysmark

In [28135]:

Backport [28106] to 1.6 branch. Refs #14969.

comment:5 Changed 10 years ago by Adam Peller

@haysmark, this probably doesn't hit the threshold to backport in the public repo, but if we do backport to 1.6, we should probably backport to 1.7, and change the milestone accordingly. My vote is not to backport.

comment:6 Changed 10 years ago by haysmark

Right, I will backport to 1.7.

You will backport major changes to the ways dates are interpreted, but won't remove a few debug statements? I think it is a pretty harmless change.

comment:7 Changed 10 years ago by haysmark

In [28136]:

Backport [28106] to 1.7 branch. Refs #14969.

comment:8 Changed 10 years ago by haysmark

Milestone: 1.81.6.2

comment:9 Changed 10 years ago by Adam Peller

@haysmark, if you're referring to #14158 that caused a regression where the calendar would fail to open. I think that's a bit different, don't you?

Note: See TracTickets for help on using tickets.