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

strftime should render even for unrelated attributes #11

Closed
jaraco opened this issue Jan 10, 2020 · 0 comments
Closed

strftime should render even for unrelated attributes #11

jaraco opened this issue Jan 10, 2020 · 0 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Jan 10, 2020

The upstream strftime allows formatting to be applied to attributes not present on the object, such as a year on a time object or a microsecond on a date object:

>>> import datetime
>>> datetime.date(1900,1,1).strftime('%f')
'000000'
>>> datetime.time(0).strftime('%Y')
'1900'

This behavior is documented but discouraged.

tempora.strftime should retain that behavior.

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

No branches or pull requests

1 participant