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

feat(generic): add DateTimeIntervalCharField #1119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented Aug 29, 2024

No description provided.

@sennierer
Copy link
Collaborator

Is there a specific reason to use DateTimeField instead of DateField?
I guess our main use case (99%) has only dates and no time.

This commit introduces a `FuzzyDateParserField` and a
`FuzzyDateRegexField`.
Both fields are based on the `GenericDateIntervalField`, which adds a
`_from`, a `_sort` and a `_to` field based on the field created. Those
three additional fields contain data that is calculated using either a
parser (in the case of the `FuzzyDateParserField`) or a regex (in the
case of the `FuzzyDateRegexField`).
The default parser for the `FuzzyDateParserField` is the one from the
`apis_core.utils.DateParser` module.
@b1rger b1rger marked this pull request as ready for review November 12, 2024 12:06
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.

2 participants