Eamena 31 extended dates#33
Conversation
Signed-off-by: adam cox <mr.adamcox@gmail.com>
Signed-off-by: adam cox <mr.adamcox@gmail.com>
Signed-off-by: adam cox <mr.adamcox@gmail.com>
Signed-off-by: adam cox <mr.adamcox@gmail.com>
|
Could you explain in what order the time filter arranges these two dates, if the mapping is an integer type? -44-03-01 Which one goes first? Another question re: validation: does the js validation apply to the new string dates? |
|
The integers are calculated by first multiplying the year by 10,000 (to add four zeros to the end of it) and then adding the concatenation of mm-dd. -439599 > -439699 so -44-04-01 > (later than) -44-03-01 You can see it here https://github.com/legiongis/arches/blob/EAMENA-31-extended-dates/arches/app/utils/date_utils.py#L4, and I took the basic concept from Arches 4 here https://github.com/archesproject/arches/blob/master/arches/app/utils/date_utils.py#L88. As for js validation, yes, there is a new function that is applied only to edtf dates: https://github.com/legiongis/arches/blob/EAMENA-31-extended-dates/eamena/eamena/media/js/views/forms/sections/validation.js#L74 |
Signed-off-by: adam cox <mr.adamcox@gmail.com>
Signed-off-by: adam cox <mr.adamcox@gmail.com>
|
@michaeltfisher I think it's reasonable that we close this pull request without merging it. Extended dates integration is something we'll be able to have by default in v4, and the level of effort required to implement the changes needed for this are not worth it with the imminent v3-v4 migration. |
Description of Change
Allow extended dates.
stringYYYY-MM-DDas before,YYYY-MM, orYYYY.-. For example,-44-03-15or-12000.extendeddatesandextendeddategroups, where they are stored as integersdatesanddate_groupsmappings.Issues Solved
#31
Types of changes
to test
pip install -r requirements.txtto install the newedtfpython requirementdatestostringsif you have the ARCHAEOLOGICAL_TO_DATE.E61 and ARCHAEOLOGICAL_FROM_DATE.E61 loaded.python manage.py packages -o index_database --resourcesif you already have resources loaded.