https://bugs.documentfoundation.org/show_bug.cgi?id=170164

            Bug ID: 170164
           Summary: Wrong year when formatting date as ISO week number
           Product: LibreOffice
           Version: 24.8.7.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Date fields may have the incorrect year when using ISO week number formatting.

Steps to Reproduce:
* Open LibreOffice Writer
* Create a new document or open an existent one
* Insert a date field. The date field value should be 2025-12-29, 2025-12-30,
or 2025-12-31.
* Format the field as:
  - Category: Date
  - Format code: YYYY"W"WW (scroll to "Additional formats…" at the bottom of
the list of formats)
* OK all relevant dialogues

Actual Results:
It returns 2025W1

Expected Results:
It should return 2026W01


Reproducible: Always


User Profile Reset: No

Additional Info:
Obviously, the year is off by one. Even though the date *is* in 2025, when used
along with the ISO week number, the year should be consistent with the ISO
week. Note that it could be:

* One year less than the calendar year (2027-01-02 = 2026W53)
* The same year as the calendar year (2026-12-30 = 2026W53, 2028-12-29 =
2028W52, 2029-01-01 = 2029W01)
* One year more than the calendar year (2025-12-29 = 2026W01)

NB: Note also that the ISO week number is supposed to be written as two digits,
so with a "0" prefix if necessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to