1. 30 Kas, 2011 5 kayıt (commit)
    • Eike Rathke's avatar
      introduced Date::IsValidDate() and Date::Normalize() · 2b2f6abf
      Eike Rathke yazdı
      + 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()
      2b2f6abf
    • Eike Rathke's avatar
      handle dates with year < 1000 · 76133599
      Eike Rathke yazdı
      * Read dates with years consisting of less than 4 digits.
        ISO 8601 specifies that years are to be written with a minimum of 4 digits.
        However, be lenient in what we accept.
      * Write years < 1000 with leading zeros to comply with ISO 8601 YYYY.
      76133599
    • Eike Rathke's avatar
      fixed fdo#40363 freeze chart wizard with non-gregorian date · 07a7b293
      Eike Rathke yazdı
      Use the newly introduced Date::Normalize() instead of a never ending
      while(!date.IsValid())
      07a7b293
    • Eike Rathke's avatar
      introduced Date::IsValidDate() and Date::Normalize() · 6619955e
      Eike Rathke yazdı
      + 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()
      6619955e
    • Eike Rathke's avatar
      renamed Date::IsValid() to IsValidAndGregorian() to prevent misassumptions · dca69d5b
      Eike Rathke yazdı
      Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
      dca69d5b
  2. 29 Kas, 2011 35 kayıt (commit)