-
Notifications
You must be signed in to change notification settings - Fork 268
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
"1 week" returns undefined #46
Comments
And perhaps it would be appropriate to throw an Error if no result can be returned. |
@okor If the problem still exists, PR is welcomed! |
I would recommend throwing an error, that is what I'm doing in parse-iso-duration. throw new Error('Ambiguous duration') |
The month unit is discussed in a dedicated issue: #57 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would expect "1 week" to return a result.
I would also expect "1 month" to return a result (though that one is slightly tricky) and sources seem to disagree.
^ I would probably just call it 30 days even and be done with it. Maybe include a note in the docs as to what the library considers 1 month.
Anyhow, weeks should probably work. Otherwise the lib is great. Thanks!
The text was updated successfully, but these errors were encountered: