Opened 16 years ago

Closed 15 years ago

#835 closed enhancement (fixed)

Date format from string to date object

Reported by: [email protected] Owned by: Adam Peller
Priority: high Milestone: 0.9
Component: General Version: 0.3
Keywords: Cc: [email protected]…, [email protected]
Blocked By: Blocking:


In we have: = = function (dateObject, format) {

but what is missing, is same but from string to dateObject.. so like: = function (dateString, format) {

implementation return dateObject;


with this, dropdowndatepicker could set it's date from userInput and also validating would be easy.

Change History (7)

comment:1 Changed 16 years ago by anonymous

Cc: [email protected] added

comment:2 Changed 16 years ago by [email protected]

Type: defectenhancement

maybe it's good to define 2 constants, indication the minimum & maximum year.

this is usefull to parse years with only 2 digits

e.g. = 1970; = 2050;

with format %m/%d/%y

01/25/06 = January 25, 2006 (not January 25, 1906)

comment:3 Changed 16 years ago by dylan

Milestone: 0.5
Owner: changed from anonymous to dylan
Status: newassigned

comment:4 Changed 15 years ago by Adam Peller

Owner: changed from dylan to Adam Peller
Status: assignednew

comment:5 Changed 15 years ago by Adam Peller

see dojo.i18n.datetime.parse. This will be based on Java DateFormat?-like syntax rather than the posix strftime() style.

comment:6 Changed 15 years ago by Adam Peller

Status: newassigned

refactored. see in src/date/format.js. It's a work in progress, but should be able to handle simple numeric formatted dates along with some locale-based defaults

comment:7 Changed 15 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [5637]) DropdownDatePicker? handling of locale-based formatting and parsing of dates (fixes #1008, fixes #821) Use locale-independent serialization for dddp in a form (fixes #721) Removed experimental from (fixes #835)

Note: See TracTickets for help on using tickets.