Bug #6442

Negative ISO dates (to capture BCE dates) cannot be recorded in start and end date fields

Added by Dan Gillean over 7 years ago. Updated almost 6 years ago.

Status:NewStart date:03/11/2014
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Form validation
Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

To reproduce
  • Create a new description, or edit an existing one
  • Add a date of 2 BCE in the display date - in ISO 8601 this should be expressed as a negative integer - e.g. -0001
  • edit the start and end date field values to -0001
  • Save the record
  • Enter edit mode again, and view the values in the start and end date fields

Resulting error
Date field is reset to display the current date in ISO 8601 form

Expected result
User can set negative ISO dates to express dates occuring before Common Era (BCE)

Reported in the user forum: https://groups.google.com/d/msg/ica-atom-users/mvvVzmADrMI/ZnJWrxjr13AJ
Tested in 2.x

History

#1 Updated by Tim Hutchinson over 7 years ago

This seems to be limitation of the MySQL date format. MySQL dates apparently start in the year 1000 - I tried entering 0001-01-01 but it's interpreted as 1 January 2001. The Y1K problem? :) Lots of discussion of this in various forums - suggested solutions tend to focus on using string fields.

#2 Updated by Dan Gillean over 7 years ago

  • Target version deleted (Release 2.0.2)

Thanks for the info, Tim. My guess is that there could be unintended consequences to changing the field type in MySQL - or, at the very least, if it were changed to accept strings, than validation would have to be added on page in some other manner to ensure that only IS0-compliant dates were written to the database. Removing target release for now - it would be great to support this, but will need more analysis. However, I am aware that a community development project for AtoM may have this as a requirement - I'm keeping an eye on their GitHub issues on this subject to see if/how it is addressed.

#3 Updated by Tim Hutchinson over 7 years ago

Definitely. Actually, I didn't mean to suggest changing the field type directly, I was assuming this would need a parallel set of fields or something. In any case complicated, as you indicate.

#4 Updated by Jesús García Crespo almost 6 years ago

  • Assignee deleted (Jesús García Crespo)

Also available in: Atom PDF