-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
%f format for datetime objects #45499
Comments
Attached is a patch for py3k which adds a %f format code to its strftime I don't know how practical this is for time.strftime() level because the |
Are you going to add support to strptime as well? As for the 'time' module, I don't think it would be useful as it serves |
It's a nit, but there are a few other comments that should be changed to
|
Brett> Are you going to add support to strptime as well? I looked at strptime for about two seconds then moved on. I presume you
Resolution isn't the issue. You just make sure you add enough zeroes to Skip |
Eric> It's a nit, but there are a few other comments that should be Yes, thanks. Skip |
On 9/13/07, Skip Montanaro <report@bugs.python.org> wrote:
Adding support is not issue. It's exposing the microseconds to But adding the %f support is very straightforward.
Right. I am in favour of this being just a datetime thing as we -Brett |
Here are new patches for 2.6 and 3.0 including changes |
Brett, Continuing the discussion of strptime... It returns a time.struct_time. yy, mm, dd, hh, mm, ss, wk, j, tz = time.strptime(...) If we could make that change for 3.0 that might allow strptime to parse S |
In terms of strptime, I would just change _strptime.strptime() to -Brett On 9/17/07, Skip Montanaro <report@bugs.python.org> wrote:
|
Brett> In terms of strptime, I would just change _strptime.strptime() to Sounds good. I'll work that into my patch(es). Skip |
Okay, here's my latest patch (datetime-f.diff). 2.6 only at this point. |
Actually, I think I will avoid the 3.0 patch altogether and let these |
Updated diff. Just a tweak to datetime.rst. |
Stop me before I update it again! This update touches up |
Checking this in. All tests pass. Have for quite awhile. |
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: