Boost logo

Boost :

From: Powell, Gary (powellg_at_[hidden])
Date: 2004-04-13 18:26:52


>Bob Bell wrote:
>The interpretation that makes sense to me is: adding one month means the
>same day of the next month, unless the date's not valid, in which case I
>expect moving backwards to the latest date of said month. That's what
>humans do when you say "next month", so I would think anything else
>would be surprising.

That would surprise me as well.

date = January 30;

add_month(date);
add_month(date);

date == March 30 ? Not March 28/29 No?

Which means of course a lot of state has to be held by date, because otherwise February does rounding. As in the number of days until the end of the month.

  Yours,
  -Gary-


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk