Skip to content
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

update parse_time in misc.py #2563

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open

update parse_time in misc.py #2563

wants to merge 2 commits into from

Conversation

igel-kun
Copy link
Contributor

@igel-kun igel-kun commented Aug 1, 2016

added functionality to parse times in format HH:MM:SS and MM:SS

@igel-kun
Copy link
Contributor Author

igel-kun commented Aug 1, 2016

oh I should mention that keep2share uses this time format to diplay wait times.

@@ -592,6 +592,12 @@ def parse_time(value):
if re.search("da(il)?y|today", value):
seconds = seconds_to_midnight()

elif re.search("\d:\d\d", value):
# use the HH:MM:SS format, NOTE: when only one ':' is found, it assumes MM:SS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why assume MM:SS and not HH:MM?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there is no way around assuming one of the two without context, and seeing that I stumbled upon that while handling wait times (they were always below 1h), this seemed the obvious choice. However, to be more general, maybe an argument should be added to the function telling it how to interprete a single colon.

@vuolter vuolter added enhancement New feature or bugfix help wanted Extra attention is needed labels Oct 23, 2016
@vuolter vuolter added this to the 0.5.x milestone Oct 23, 2016
@vuolter vuolter added invalid This doesn't seem right feedback wanted User attention is needed and removed help wanted Extra attention is needed labels Dec 27, 2018
@CLAassistant
Copy link

CLAassistant commented Aug 27, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Igel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or bugfix feedback wanted User attention is needed invalid This doesn't seem right
Development

Successfully merging this pull request may close these issues.

None yet

4 participants