Bug 137448 - Calc formatting numbers to date day causes wrong numbers
Summary: Calc formatting numbers to date day causes wrong numbers
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-13 12:14 UTC by Joachim Persicke
Modified: 2020-10-13 21:17 UTC (History)
0 users

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 Joachim Persicke 2020-10-13 12:14:14 UTC
Description:
When a column with numbers of days of a month is formatted to date day (Code TT.) the numbers are one number less then before (number 1 turns to 31)

Actual Results:
column with number of days of a month extracted from a dato
column formatted as date day


Expected Results:
every number shows with one less for example 2 instead of 3


Reproducible: Always


User Profile Reset: No



Additional Info:
the numbers should be unchanged
Comment 1 [REDACTED] 2020-10-13 21:07:33 UTC
If you add 1 through 31 into a column and format using a date format, then you tell LibreOffice to interpret these numbers as date, but to show only the day of the date. And according standard setting of LibreOffice setting day 0 is 1899-30-12, 1=1899-31-12 (DD-formatted=31) , 2=1900-01-01 (DD-formatted=01), 3=1900-01-02(DD-formatted=02) and so on until TODAY()=44117 (DD-formatted=01).

See also http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017888_715980110

This is not a bug.
Comment 2 [REDACTED] 2020-10-13 21:08:32 UTC
Correction: TODAY()=44117 (DD-formatted=13).
Comment 3 [REDACTED] 2020-10-13 21:16:15 UTC
(In reply to Uwe Auer from comment #1)

Correction:

If you add 1 through 31 into a column and format using a date format, then you tell LibreOffice to interpret these numbers as date, but to show only the day of the date. And according standard setting of LibreOffice setting:

Day=0: 1899-12-30 (DD-formatted=30)
Day=1: 1899-12-31 (DD-formatted=31)
Day=2: 1900-01-01 (DD-formatted=01)
Day=3: 1900-01-02 (DD-formatted=02) and so on until 
TODAY()=44117: 2020-10-13 (DD-formatted=13)

> See also
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.
> html#__RefHeading__1017888_71598011

This is not a bug.