Dave H
Posts: 16
Nickname: slebtack
Registered: Apr, 2007
|
|
Re: Adding/subtracting dates
|
Posted: Apr 18, 2007 6:16 AM
|
|
Your local timezone is five hours out from GMT. You're in the USA or Canada, in the east but not on the coast?
You can't add times, any more than you can add places. You can add durations, the length of time between two instants in time, just like you can add distances between places.
The Date class represents instants in time. It does not represent durations.
Try subtracting the Date for midnight on the 1st January 1970 from your dates before adding them, then subtracting it from the answer.
|
|