Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ODF 1.2 Part 2 CD 3
    • Component/s: OpenFormula
    • Labels:
      None
    • Proposal:
      Hide

      For the 30US/360 method:

      1. Truncate date values, set sign=1.

      2. If StartDate's day-of-month is 31, it is changed to 30.

      3. Otherwise, if StartDate's day-of-month is the last day of February, it is changed to 30.

      4. If EndDate's day-of-month is 31 and StartDate's day-of-month is 30 (after having applied a change for #2 or #3, if necessary), EndDate's day-of-month is changed to 30.

      Note: This calculation is slightly different from Basis 0 (3.11.6 Basis). Dates are never swapped.

      For the 30E/360 method insert:

      1. Truncate date values, set sign=1.

      2. If StartDate is after EndDate then swap dates and set sign=-1.

      3. If StartDate's day-of-month is 31, it is changed to 30.

      4. If EndDate's day-of-month is 31, it is changed to 30.

      Note: Days in February are never changed.

      Note: This calculation is identical to Basis 4 (3.11.6 Basis)

      After both methods:

      For both methods the value then returned is
      sign * ((EndDate.year*360 + EndDate.month*30 + EndDate.day) - (StartDate.year*360 + StartDate.month*30 + StartDate.day))

      Show
      For the 30US/360 method: 1. Truncate date values, set sign=1. 2. If StartDate's day-of-month is 31, it is changed to 30. 3. Otherwise, if StartDate's day-of-month is the last day of February, it is changed to 30. 4. If EndDate's day-of-month is 31 and StartDate's day-of-month is 30 (after having applied a change for #2 or #3, if necessary), EndDate's day-of-month is changed to 30. Note: This calculation is slightly different from Basis 0 (3.11.6 Basis). Dates are never swapped. For the 30E/360 method insert: 1. Truncate date values, set sign=1. 2. If StartDate is after EndDate then swap dates and set sign=-1. 3. If StartDate's day-of-month is 31, it is changed to 30. 4. If EndDate's day-of-month is 31, it is changed to 30. Note: Days in February are never changed. Note: This calculation is identical to Basis 4 (3.11.6 Basis) After both methods: For both methods the value then returned is sign * ((EndDate.year*360 + EndDate.month*30 + EndDate.day) - (StartDate.year*360 + StartDate.month*30 + StartDate.day))

      Description

      Copied from office-comment list

      Original author: "David King" <openoffice@drking.plus.com>
      Original date: 12 Aug 2008 22:00:01 -0000
      Original URL: http://lists.oasis-open.org/archives/office-comment/200808/msg00022.html

      From that comment mail:

      DAYS360 and financial date systems

      • Consider whether to specify compliance with the Excel NASD date bug or introduce a switch for NASD compliance. The bug has to be mentioned I think.
      • The date systems implemented by Excel and specified by ODFF are only a subset of date systems used in practice, which might be worth noting.

        Attachments

          Activity

            People

            • Assignee:
              erack Eike Rathke (Inactive)
              Reporter:
              rcweir Robert Weir (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: