-
Notifications
You must be signed in to change notification settings - Fork 148
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
Added format_timedelta and support function english_list. #57
Conversation
@hugovk do you think that this feature has value for |
Hi,
I'm still here, but I see there's something about the code needing
localisation, and I've got no idea about that.
You're welcome to use the code though.
Take care,
Chris Norman
…On Sun, 14 Jun 2020 at 23:01, eldipa ***@***.***> wrote:
@hugovk <https://github.com/hugovk> do you think that this feature has
value for humanize? IMHO I think that it has.
I could do the rebase (or reimplementation) needed if there is interest on
this and if @chrisnorman7 <https://github.com/chrisnorman7> is not
available (I would give him credit of course)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBUZ2OJRUX4VUQANGP5YFDRWVCCTANCNFSM4DN5WN4Q>
.
|
Hello, this doesn't need localisation (as the others in time.py also aren't localised), but it does need tests. Thanks! |
@@ -166,3 +166,66 @@ def naturaldate(value): | |||
return naturalday(value) | |||
|
|||
|
|||
def english_list( |
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.
I think this should be an internal function:
def english_list( | |
def _english_list( |
) | ||
if seconds and show_seconds: | ||
fmt.append('%.2f seconds' % seconds) | ||
return english_list(fmt) |
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.
return english_list(fmt) | |
return _english_list(fmt) |
This has been superseded by #137. Thanks both! |
As per issue #48.