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.
Version: 24.8.7.2 (X86_64) / LibreOffice Community Build ID: 480(Build:2) CPU threads: 16; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb) Locale: en-GB (en_GB.UTF-8); UI: en-GB Calc: threaded
Throwaway, thank youfor reporting the bug. Do you have any idea, how to reproduce it now? => NEEDINFO