Bug 120633

Summary: Date Field in Base
Product: LibreOffice Reporter: tsthomson
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: drewjensen.inbox, miguelangelrv
Priority: medium    
Version: 6.1.2.1 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description tsthomson 2018-10-15 19:34:16 UTC
Description:
Does not recognise 29th February as a valid date. If date is entered, defaults back to 30/12/1899.

Steps to Reproduce:
1.Enter 29/02/[YYYY] where [YYYY] is any year from 1899 onwards
2.Press TAB or click into another cell in Base
3.

Actual Results:
The date was changed from the date I entered, 29/02/1971, to 30/12/1899.

Expected Results:
The cell should have read 29/02/1971


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 m_a_riosv 2018-10-15 20:57:46 UTC
For me 29/02/1971 is introduced as text in the cell because it is not a valid date, 1971 it is not a leap year.
Only for leap years it's introduce as a true date in the cell.
Comment 2 m_a_riosv 2018-10-15 20:58:40 UTC
Sorry forgot my comment I was testing on calc.
Comment 3 Drew Jensen 2018-10-15 22:19:11 UTC
I'm using Ubuntu 18.04, not windows, and LibreOffice 6.1.2 and 5.4.7

Date fields default to a format of MM/DD/YY but I can change that to DD/MM/YYYY. 

This change in format however only effects the display of the date. When entering a date I still must enter MM/DD/YYYY (02/29/1972) for it to be accepted and immediately changed for display to 29/02/1972 otherwise it changes to 30/12/1899. 

By chance have you tried entering 02/29/1972 and see if that is accepted with 6.1.2 under windows?
Comment 4 Alex Thurgood 2018-10-17 07:37:47 UTC
(In reply to tsthomson from comment #0)
> Description:
> Does not recognise 29th February as a valid date. If date is entered,
> defaults back to 30/12/1899.
> 

Invalid dates receive the default start date of LO, ie. 30/12/1899.

> Steps to Reproduce:
> 1.Enter 29/02/[YYYY] where [YYYY] is any year from 1899 onwards
> 2.Press TAB or click into another cell in Base
> 3.
> 
> Actual Results:
> The date was changed from the date I entered, 29/02/1971, to 30/12/1899.
> 
> Expected Results:
> The cell should have read 29/02/1971
> 
> 

29/02/1971 is an invalid date. 1971 was not a leap year.