Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#519 closed defect (fixed)

dojo.date.fromSql parses month incorrectly.

Reported by: joey@… Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.2
Keywords: dojo.date.fromSql Cc:
Blocked By: Blocking:

Description

dojo.date.fromSql parses SQL string such as 2006-03-02 to SQL date object April, 2, 2006. This is due to javascript date objects only accepting months from 0 to 11.

As a temporary workaround, we have temporarily applied the following fix:

dojo.date.fromSql = function(sqlDate) {

var parts = sqlDate.split(/[- :]/g); while(parts.length < 6) {

parts.push(0);

} return new Date(parts[0], (parseInt(parts[1], 10) - 1), parts[2], parts[3], parts[4], parts[5]);

}

Change History (3)

comment:1 Changed 13 years ago by alex

Milestone: 0.2.2release0.3.1
Priority: highnormal
severity: majornormal

moving to the correct release

comment:2 Changed 13 years ago by Tom Trenka

Resolution: fixed
Status: newclosed

Fixed.

comment:3 Changed 12 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.