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

Subtract #1

Closed
joseluisq opened this issue Feb 12, 2018 · 10 comments
Closed

Subtract #1

joseluisq opened this issue Feb 12, 2018 · 10 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@joseluisq
Copy link
Owner

sub function to subtract an array of string times.

Example:

sub(['19:30:50', '00:30:10'])
// "19:00:40"
@joseluisq joseluisq added enhancement New feature or request help wanted Extra attention is needed labels Feb 12, 2018
@djschoone
Copy link

How can I help?

@joseluisq
Copy link
Owner Author

How can I help?

Hey, here a starting point https://github.com/joseluisq/timelite/blob/master/index.js#L99-L124
Feel free to clone the repo and send some PR.

@joseluisq
Copy link
Owner Author

@djschoone tell me if you need some help.

@djschoone
Copy link

@joseluisq I have looked into the different functions. I think the approach is not right. Why not calculate hours, minutes and seconds to an integer in seconds ((hours * 60 * 60) + (minutes * 60) + seconds))? A lot easier to calculate with.

@joseluisq
Copy link
Owner Author

@joseluisq I have looked into the different functions. I think the approach is not right. Why not calculate hours, minutes and seconds to an integer in seconds ((hours * 60 * 60) + (minutes * 60) + seconds))? A lot easier to calculate with.

Sure, can you do it?

@joseluisq
Copy link
Owner Author

It makes more sense work at seconds-integer level. can you suggest an alternative? I open to adopt it.

@MortenHe
Copy link

any news about the substract method?

@joseluisq
Copy link
Owner Author

Hey @MortenHe!
The project was frozen but I will resume it in coming weeks.

@joseluisq
Copy link
Owner Author

If you have ideas please let me know or you can send me a PR.

@joseluisq joseluisq self-assigned this Feb 3, 2019
@joseluisq
Copy link
Owner Author

v1.0.0 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants