#519 closed defect (fixed)
dojo.date.fromSql parses month incorrectly.
Reported by: | 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 15 years ago by
Milestone: | 0.2.2release → 0.3.1 |
---|---|
Priority: | high → normal |
severity: | major → normal |
Note: See
TracTickets for help on using
tickets.
moving to the correct release