-
Notifications
You must be signed in to change notification settings - Fork 440
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
format_datetime: using 'S...S' format is incorrect #353
Conversation
This is missing test cases. You would need to prove that the earlier behavior is wrong and that this patch fixes it. :) |
@akx Oh thanks!! I will see to it. 😄 |
Current coverage is
|
Hey @iamshubh22, okay, so now you have a test case, but I'd still like to see some sort of reasoning (maybe in the form of a reference to the particular piece of specification?) that explains why this new behavior is correct :) In addition, a couple more test cases wouldn't go amiss, explaining the different cases that the newly implemented behavior covers. |
return self.format(round(float('.%s' % value), num) * 10**num, num) | ||
value = self.value.microsecond / 1000000 | ||
return self.format(round(value, num) * 10**num, num) | ||
""" Returns fractional seconds. Converts microseconds received to the \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring for a function needs to be before the code, not after. :)
Fixes #350