|
Boost Users : |
From: shaneforbes (shaneforbes_at_[hidden])
Date: 2002-11-15 11:58:31
date bogus_date_I_hope(2002,02,29);
I was hoping the above date would not be allowed (2002 is not a leap
year).
However I notice that the date_time library considers this to be Mar
01, 2002.
This is reasonable but what if I want the stricter interpretation -
i.e, "20020229 is not a valid date".
After all the date_time library does not allow 20020232 and a not too
unreasonable person might say "Well if 2002029 is converted to
20020301 why isn't 20020232 converted to 20020304."
Short of creating my own logic is there a way for the date_time
library to not accept invalid dates?
I was hoping is_not_a_date() would not allow 20020229.
If there isn't a simple way of coercing the right range for dates, is
there some document out there that I can point to to say "Hey the
decision to wrap a restricted range of invalid dates is quite ok -
look at this document (from XYZ)."
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net