-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Missing valid directive %D in datetime.strftime() documentation #88950
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
Comments
Output of: datetime.datetime.now().strftime('%D') Is there a reason that directive %D is missing in documentation? Are there other hidden directives? |
It's dependent on the platform's C library's strftime(). I think (but don't promise) that we document the C89 codes, but each platform might provide additional ones. |
Perhaps it could be mentioned more clearly in the datetime documentation that apart from the directives of the C89 standard, you can also use those that the underlying libc strftime() supports. The following sentence from https://docs.python.org/3/library/time.html#time.strftime describes it well in my opinion: Perhaps a reference to "man strftime" would also be helpful. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: