Download it now!
Bug 125652 - Date format not respected while editing cells
Summary: Date format not respected while editing cells
Status: CLOSED DUPLICATE of bug 125109
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-03 09:17 UTC by herman.viaene
Modified: 2019-06-03 16:37 UTC (History)
2 users (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 herman.viaene 2019-06-03 09:17:33 UTC
Description:
Create empty calc file, select first column and take "Format cells". Opt for language "Dutch Belgium" and select format "31/12/1999".
Now type in a cell "1/5/2019" and see that you get in the cell "05/01/2019". Type "23/4/2019" and you get the correct "23/04/2019".
Selecting format "31 dec 1999" and do the same input as above, and you get in the cells "5 jan 2019" and "23 apr 2019"

Actual Results:
Date format is only respected if the first number is greater than 12, i.e. it cannot be a month. When the first number is 12 or less, then this number is taken for month.

Expected Results:
The date info in the cells is not recorded correctly.


Reproducible: Always


User Profile Reset: No



Additional Info:
My system (Mageia 6) is configured in English with Belgian keyboard. This problem I never had on previous LO versions.
Comment 1 Jacques Guilleron 2019-06-03 14:23:45 UTC
Hi Herman,

I dont reproduce with 
LO 6.3.0.0.alpha1
Build ID: 547edd20e527fb02900f6174973770d26306e2e7
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: en-US (fr_FR); UI-Language: en-US
Calc: CL
Which give:

05/01/2019
23/04/2019
1 mei 2019
23 apr 2019

Cordially,

Jacques
Comment 2 Oliver Brinzing 2019-06-03 14:39:51 UTC
(In reply to herman.viaene from comment #0)
> Description:
> Create empty calc file, select first column and take "Format cells". Opt for
> language "Dutch Belgium" and select format "31/12/1999".
> Now type in a cell "1/5/2019" and see that you get in the cell "05/01/2019".

maybe related to

[Bug 125109] Calc swaps day and month of edited dates if the format's DMY order does not match the locale's MDY order and date acceptance patterns match both.
https://bugs.documentfoundation.org/show_bug.cgi?id=125109
Comment 3 herman.viaene 2019-06-03 14:42:22 UTC
Copy/paste 05/01/2019
That is not correct, if the format is applied correctly it should be 01/05/2019
Comment 4 Eike Rathke 2019-06-03 16:37:06 UTC
The key here probably is "configured in English" en-US system (or default LibreOffice) locale with M/D/Y date order and "Dutch Belgium" nl-BE format with D/M/Y date order. Input always follows the system locale, only if there is no match (i.e. input does not result in a date as in 23/4/2019) the individual format is tried.

Reason is (and was before) that for an empty cell there is no user visible indicator what YMD order is expected (unless s/he looks up the format first).

The resolution for bug 125109 is to keep the system locale's YMD order processing (here M/D/Y) for new input in empty cells (again unless no match) but follow the format's locale's YMD order (here D/M/Y) if the cell already contains a date.

If you want to process always D/M/Y order in your constellation you can do two things under Tools -> Options -> Language Settings -> Languages:
* either set the Locale setting to Dutch (Belgium), which also changes the date acceptance patterns
* or set the (insert a) first date acceptance pattern with D/M/Y

*** This bug has been marked as a duplicate of bug 125109 ***