-
-
Couldn't load subscription status.
- Fork 404
Description
Description
Dates which are:
- old enough to have a '0' in the thousands place of the year,
- old enough to be marked
BC, or - far enough into the future to have more than 4 digits in the year
are all mangled by the UI.
This comprises the vast majority of dates which are possible to store in PostgreSQL, many of which are pretty reasonable to see in real-world data.
The problem also affects Date/Time types.
Expected behavior
The UI should render these correctly, or at least throw an error.
To Reproduce
Use the table creation flow, copy-and-paste data, and paste the following:
the_date
2001-12-31
0200-12-31
0001-12-31
20010-12-31
2001-12-31 BC
Note that the preview shows the wrong things, but the response from the API is correct:
The issue persists in the table page:
The behavior also affects individual record pages, as well as editing operations.
Additional context
Our date input and display seem to be optimized for very current dates to the exclusion of other considerations. This is a problem for, e.g., a museum storing information about artifacts or art from the middle ages, much less BC. A lower priority would be correctly handling dates so far in the future that they need more than 4 digits in the year, but it still seems like we should at least throw an error in that case.