diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:23 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:23 +0100 |
commit | 6619955e72c1c2f29a32e82478d19147c0d7610a (patch) | |
tree | cc4e45e240718901d7be246f51c8e4e6dda1892b /basic | |
parent | dca69d5bb2d0e542de26624dd9f71fb87e1533f2 (diff) |
introduced Date::IsValidDate() and Date::Normalize()
+ IsValidDate() checks only day and month regarding the year, not Gregorian
cut-off date as now does IsValidAndGregorian().
+ Normalize() carries over invalid day and month values to next months and
years.
* All methods that return or internally use a day count now internally
normalize the date values, without modifying the actual Date instance. So,
if the date is not valid you may get unexpected results.
* Previously, a date with month>12 would had accessed the days-of-month
array out of bounds on all such methods. So you would had gotten
unexpected results anyway..
* Affected methods are:
GetDayOfYear()
GetWeekOfYear()
GetDaysInMonth()
static DateToDays()
Diffstat (limited to 'basic')
0 files changed, 0 insertions, 0 deletions