FROM : Dominic Feira
DATE : Thu Oct 07 23:46:56 2004
Hello.
Somehow I have managed to construct a NSCalendarDate that returns the
incorrect dayOfWeek.
I am doing a lot of manipulating of the date by adding years, months,
and days to it depending on various parameters. I don't understand how
it is possible to end up with a date that is incorrect.
I have using dateByAddingYears:months:days:hours:minutes:seconds.
There is a small note in the docs that state it is possible to land on
the next day by accident because of daylight savings time, but it
doesn't say that the date you get will be out of synch with reality and
invalid.
I log the date and I get:
[result dayOfWeek]: 2 // SHOULD BE 3
2005-07-12 18:17:45 -0400
If you check in iCal, this is clearly incorrect.
Is there something about NSCalendarDate that I am misunderstanding?
Dominic Feira / Code Monkey / Ambrosia Software, Inc.
DATE : Thu Oct 07 23:46:56 2004
Hello.
Somehow I have managed to construct a NSCalendarDate that returns the
incorrect dayOfWeek.
I am doing a lot of manipulating of the date by adding years, months,
and days to it depending on various parameters. I don't understand how
it is possible to end up with a date that is incorrect.
I have using dateByAddingYears:months:days:hours:minutes:seconds.
There is a small note in the docs that state it is possible to land on
the next day by accident because of daylight savings time, but it
doesn't say that the date you get will be out of synch with reality and
invalid.
I log the date and I get:
[result dayOfWeek]: 2 // SHOULD BE 3
2005-07-12 18:17:45 -0400
If you check in iCal, this is clearly incorrect.
Is there something about NSCalendarDate that I am misunderstanding?
Dominic Feira / Code Monkey / Ambrosia Software, Inc.
| Related mails | Author | Date |
|---|---|---|
| Dominic Feira | Oct 7, 23:46 | |
| Kevin Ballard | Oct 7, 23:57 | |
| Dominic Feira | Oct 8, 01:06 |






Cocoa mail archive

