https://bugs.documentfoundation.org/show_bug.cgi?id=164357
Bug ID: 164357
Summary: Inconsistent handling of 'MonthName-Number' pattern
leads to unexpected date interpretations
Product: LibreOffice
Version: 24.8.3.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
LibreOffice Calc exhibits inconsistent behavior when interpreting the
MonthName-Number pattern. Current observations:
Input | Interpretation | Type
-------------|--------------------|---------
"June-30" | Date(2024, 6, 30) | Date
"June-31" | "June-31" | Text
"June-32" | Date(1932, 6, 1) | Date
Current parsing rules seem to be:
1. If number ≤ 31:
a. Interpret as MonthName-Day if the day is valid for that month
b. Treat as text if the day is invalid for that month (e.g., "June-31")
2. If number > 31: Interpret as MonthName-Year
Proposed Rule (less restrictive):
1. Interpret as MonthName-Day if the day is valid for that month.
2. Otherwise, interpret as MonthName-Year.
This is similar to Excel’s parsing behavior.
Steps to Reproduce:
Enter each of the three inputs in separate cells.
Actual Results:
Input | Interpretation | Type
-------------|--------------------|---------
"June-30" | Date(2024, 6, 30) | Date
"June-31" | "June-31" | Text
"June-32" | Date(1932, 6, 1) | Date
Expected Results:
Input | Interpretation | Type
-------------|--------------------|---------
"June-30" | Date(2024, 6, 30) | Date
"June-31" | Date(1931, 6, 1) | Date
"June-32" | Date(1932, 6, 1) | Date
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 24.8.3.2 (AARCH64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: macOS 15.0; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_CN.UTF-8); UI: en-US
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.