Islandora / controlled_access_terms

Drupal module for subject and agents
GNU General Public License v2.0
7 stars 28 forks source link

[FEATURE] Validate date intervals for EDTF #123

Open AronNovak opened 3 weeks ago

AronNovak commented 3 weeks ago

Overview of feature request

Add functionality to validate that in EDTF intervals, the start date is sooner than the end date within the EDTFUtils class.

What kind of user is the feature intended for?

Developers and Collections Managers who work with Extended Date Time Format (EDTF) dates and need to ensure accurate date intervals.

What inspired the request?

The need to ensure data integrity and logical consistency in date intervals. Users should be confident that date intervals are correctly formatted, with the start date always preceding the end date.

What existing behavior do you want changed?

The current validate function in the EDTFUtils class does not check that for intervals, the start date is sooner than the end date. This can lead to incorrect data representation and potential logical errors in date-related operations.

Any brand new behavior do you want to add to Islandora?

Yes, introduce a check within the validate function to compare the start and end dates of an interval. If the start date is later than the end date, an appropriate error message should be returned.

Any related open or closed issues to this feature request?

No known related issues at this time.