Login Register

dojo.date

Problem with dojo.date.add

I have a widget I created way back in 0.4 that I'm porting over to 1.0
It is using dojo.date.add a lot and today I found a problem.
Back in Dojo 0.4 a call like this dojo.date.add(date, dojo.date.dateParts.DAY, 1); resulted in the following code:

date.setDate(date.getDate() + 1);

In Dojo 1.0.x the call dojo.date.add(date, "day", 1); results in the following code:

date.setUTCDate(date.getUTCDate() + 1);
Syndicate content