in reply to Re: Getting previous dates from the current date
in thread Getting previous dates from the current date

Pretty easy.

Not in the general case it isn't. Date and time calculations seem to be one of those things that sound misleadingly simple, but actually turn out not to be.

There are 86400 seconds in a day.

Not always. This code will not work correctly if it spans changing the clocks for daylight-saving (see a previous reply above for a detailed example).

Smylers

  • Comment on Re^2: Getting previous dates from the current date