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

Feature/print format #37

Merged
merged 5 commits into from
Apr 10, 2015
Merged

Conversation

shantanuthatte
Copy link

Implemented formatting of display time by providing a format option. Formats are:
%h - Hours without leading zero.
%m - Minutes without leading zero.
%s - Seconds without leading zero.
%H - Hours with leading zero.
%M - Minutes with leading zero.
%S - Seconds with leading zero.

NOTE: If you pass {seconds: 69, format: '%m:%s'} you would still get 1:09 as output. If 1:9 is required, it's a simple fix by adding parseInt() to formatDef for %h, %m and %s.

Shantanu Thatte added 2 commits April 9, 2015 00:38
…. Formats are:

'%h' - Hours without leading zero.
'%m' - Minutes without leading zero.
'%s' - Seconds without leading zero.
'%H' - Hours with leading zero.
'%M' - Minutes with leading zero.
'%S' - Seconds with leading zero.
@shantanuthatte shantanuthatte mentioned this pull request Apr 9, 2015
@walmik
Copy link
Owner

walmik commented Apr 9, 2015

Thank you very much for implementing this much desired functionality in such a systematic manner! Please bump version in package.json to 0.3.0 and I ll merge this.

Shantanu Thatte added 2 commits April 9, 2015 20:28
@shantanuthatte
Copy link
Author

I've updated package.json and edited README.md. Updated README.md is here.

@walmik
Copy link
Owner

walmik commented Apr 10, 2015

Excellent!

walmik added a commit that referenced this pull request Apr 10, 2015
@walmik walmik merged commit 6d4959f into walmik:master Apr 10, 2015
@shantanuthatte shantanuthatte deleted the feature/print-format branch April 10, 2015 03:06
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

Successfully merging this pull request may close these issues.

2 participants