-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adds 'mon' for Month #26
Conversation
Hey @IanMitchell, Thanks for this! Happy to merge this in, but could you make a few small changes:
|
1 similar comment
@@ -15,6 +15,51 @@ describe('timestring', function() { | |||
expect(timestring('1y')).to.equal(29030400); | |||
}); | |||
|
|||
it('can parse different unit identifiers', function() { | |||
var unitMap = { |
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 had to duplicate the map since it isn't exported, but I think violating DRY is ok here since looping over the unit types really reduces the amount of code. Happy to change how I wrote this test if you disagree though!
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.
Ah no problem, i like what you've done with the test, nice one 👍
@IanMitchell Thanks for this! |
Released |
Thanks, much appreciated! |
Added an abbreviation for month that I see most commonly in the app I'm working on