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

RFE: representation of datetime #13

Open
dpzimmer opened this issue Mar 27, 2020 · 1 comment
Open

RFE: representation of datetime #13

dpzimmer opened this issue Mar 27, 2020 · 1 comment

Comments

@dpzimmer
Copy link

dpzimmer commented Mar 27, 2020

The str() representation of a datetime value is s.isoformat(sep=' ') whereas the representation of a DateTimeField is s.isoformat(sep='T').

It would be nice to have the option for natural_key representation of datetime values using the latter... perhaps adding a datetime_separator variable similar to the natural_key_separator variable. Example attached.

thanks

natural_keys.models.py.txt

@sheppard
Copy link
Member

It seems like it would be good to support some flexibility here - perhaps via a general date format specifier rather than just the separator. A good place to start might be a pull request that adds a datetime test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants