Description: I encountered an issue where entering ‘2021-6/1’ produces different results based on the cell’s format: if the format is ‘YYYY-MM-DD’, it is interpreted as a date; otherwise, for formats like ‘MMM DD,’ it is treated as text. Steps to Reproduce: 1. Set the cell format as YYYY-MM-DD, enter string "2021-6/1" 2. Set the cell format as MMM-DD, enter string "2021-6/1" Actual Results: I believe the underlying interpretation rules should be independent of the cell format. Expected Results: 1. date 1905-07-19 2. text 2021-6/1 Reproducible: Always User Profile Reset: No Additional Info: I believe the entered string ‘2021-6/1’ should be interpreted as text, regardless of the cell format.
Thank you for reporting the bug. I can confirm that for both formats YYYY-MM-DD and MM-DD string ‘2021-6/1’ turns into a dates 1905-07-19 and 07-19. But it doesn't turn into a date if you put dash instead of hyphen. Version: 24.8.3.2 (AARCH64) / LibreOffice Community Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92 CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: 7713d916e06a8388f849a758f928cbcfded6c0ae CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Checked in the dev chat and it is "implemented specifically for dates/times", so let's close.
Note this depends on the locale, e.g. is not reproducible in an en-CA locale with Y-M-D date acceptance pattern, but is in en-US (M/D/Y) or en-GB (D/M/Y) or de-DE (D.M.Y). However, I don't see a reason why an input of 2021-6/1 should result in a date of 1905-07-19, this looks plain wrong to me.
The input erroneously hits the fraction detection and ends up as 2021 6/1 = 2027, and 2027 days since the null date 1899-12-30 gives 1905-07-19. This at least since LO 5.3, probably earlier, don't have an older version at hand.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6926c820ceea1a1337a97b0afda95b072027a6ff Resolves: tdf#164124 Do not trap incomplete date 2021-6/1 as fraction It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/5ddccd3896abe24de2ff4b4f3cc9bf609305990a Resolves: tdf#164124 Do not trap incomplete date 2021-6/1 as fraction It will be available in 25.2.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review https://gerrit.libreoffice.org/c/core/+/177959 for 24-8.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/da87646c4f407532b41e288f3ddac9f09e42be47 Resolves: tdf#164124 Do not trap incomplete date 2021-6/1 as fraction It will be available in 24.8.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-24-8-4": https://git.libreoffice.org/core/commit/c4cf076342f3e292a17ced3b9e33bf12e091b856 Resolves: tdf#164124 Do not trap incomplete date 2021-6/1 as fraction It will be available in 24.8.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b5ff805386556a01fc7aa39696bfc987739f22b2 tdf#164124: sc_ucalc: Add unittest It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.