Closed
Conversation
Fix whitespace
70ebfcd to
16d1240
Compare
Member
|
@dstansby Did you base this formatting mini-language on anything? I'd like to implement something similar in dateutil/dateutil#444, but I'm not aware of any standard way to do it. |
pganssle
reviewed
Aug 17, 2017
| assert dt == tdelta | ||
|
|
||
|
|
||
| @pytest.mark.parametrize('dt, fmt, out', |
Member
There was a problem hiding this comment.
I think you'd probably want a lot more tests. What happens for a negative timedelta?
How about ('{H:02}:{M:02}', timedelta(days=4, hours=0, minutes=0, seconds=4))?
Member
|
Is it a bit inconsistent with |
Member
Author
|
I'm going to close this in favour of dateutil/dateutil#444 - I think doing this upstream in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
A new
TimedeltaFormatterclass for formattingtimedeltaobjects. Unlikedatetimeobjects there's nostrftimemethod, so I've had to roll my own version. The docstring examples and tests I've added should make it clear how it works.This depends on PR #8730. See #8869 for tracker issue for plotting
timedeltaobjects.