Bug 164227 - LibreOffice Calc incorrectly treats dots as part of month names instead of separators on several date patterns
Summary: LibreOffice Calc incorrectly treats dots as part of month names instead of se...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2024-12-07 08:47 UTC by gplhust955
Modified: 2024-12-09 16:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gplhust955 2024-12-07 08:47:52 UTC
Description:
When a month name is followed by a dot (e.g. "Jan.", "Feb."), Calc treats the dot as part of the month name rather than a separator. For example: 
    - Pattern1: "Jan.-15, 2024" -> Date(2024, 1, 15)
    - Pattern2: "Mar.-28"       -> Date(2024, 3, 28)
    - Pattern3: "Mar.-30"       -> Date(1932, 3, 1)
while "1-Jan.-2021" is treated as text instead of date.

Google Sheet will only accept "Jan.1" as date instead of "Jan.-1".



Steps to Reproduce:
To reproduce:
    1. Enter "Jan.-15, 2024" in a cell
    2. The cell should be formatted as text instead of being parsed as a date
    3. Try with other abbreviated month names followed by dots

Actual Results:
Date(2024, 1, 15)

Expected Results:
Treat them as text.


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
Comment 1 Eric Rodriguez 2024-12-07 18:36:05 UTC
I don't know if this is a bug or intended, since you are comparing what LO does to google sheets. When entering "Jan.-15, 2024" in a cell, it is recognized as a date. If I enter "Jan.-15,2024" with no space between comma and 2024, it keeps it as text. I tried with multiple months/days/years and each time if I have the space between comma and year, it treats it as a date. When no space between comma and year it treats it as text.

I can confirm this issue is present in:
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

I can confirm this issue is present in:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4ffd1e31b17965646fe4893e9a393fab3294b383
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 2 Eike Rathke 2024-12-09 16:45:15 UTC
Not a bug.
An abbreviated month name in a long date input like  Jan.-15, 2024  may be followed by a dot, which is part of the month and not a separator (unless the long date month separator is dot itself).

An input of  1-Jan.-2021  in an en-US locale is treated as text because in that format the dot is not valid.


>     - Pattern3: "Mar.-30"       -> Date(1932, 3, 1)
Certainly not. The result is date 2024-03-30 formatted as 03/30/24