Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/mx-1569 Distinguish date (Year-Month-Day) from Year-Month or Year #17

Merged
merged 6 commits into from
Mar 18, 2024

Conversation

carolinscholl
Copy link
Contributor

PR Context

To improve date validation, we need to distinguish between dates (with format YYYY-MM-DD) and partial dates like only YYYY or YYYY-MM. That is why there is now a new type for these partial dates.

Added

  • new partial date type (for YYYY or YYYY-MM formats)

@cutoffthetop cutoffthetop requested a review from fdiehr February 23, 2024 09:17
@cutoffthetop cutoffthetop changed the title Distinguish date (Year-Month-Day) from Year-Month or Year feature/mx-1569 Distinguish date (Year-Month-Day) from Year-Month or Year Feb 29, 2024
Copy link
Contributor

@fdiehr fdiehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good, but I wonder, if it makes more sense to define some field schemas (mex/model/fields) for the different date types (datetime and date with the different patterns). then we wouldn't need to define the respective fields in each entity schema and each property, but reference the specific date type field. what do you think?

fdiehr
fdiehr previously approved these changes Mar 18, 2024
@cutoffthetop
Copy link
Contributor

look good, but I wonder, if it makes more sense to define some field schemas (mex/model/fields) for the different date types (datetime and date with the different patterns). then we wouldn't need to define the respective fields in each entity schema and each property, but reference the specific date type field. what do you think?

as discussed in a call: i think that is not really worth it since we already have 3 different combos of accepted date/times that fields accept (date, datetime, datetime+str)

@cutoffthetop cutoffthetop merged commit d4aba62 into main Mar 18, 2024
5 checks passed
@cutoffthetop cutoffthetop deleted the feature/mx-1569-date-validation branch March 18, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants