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

formatSeconds.js is unnecessarily verbose #109

Open
mustafa0x opened this issue May 25, 2018 · 1 comment
Open

formatSeconds.js is unnecessarily verbose #109

mustafa0x opened this issue May 25, 2018 · 1 comment

Comments

@mustafa0x
Copy link

https://github.com/quran/audio.quran.com/blob/master/src/utils/formatSeconds.js

Instead the 11 lines, you can just use this:

let fmt_time = s => (new Date(s * 1000).toISOString().substr(10, 9)).replace(/T(00:)?/, '');

It's what I wrote for qari.one.

@thabti
Copy link
Contributor

thabti commented May 27, 2018

@mustafa0x feel free to raise a PR :)
We could do with some help. Jzkallah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants