-
Notifications
You must be signed in to change notification settings - Fork 7k
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 Request] Add global option to raise errors on invalid dates or fallbacks to new Date(d)
#4985
Comments
Hi, I'm looking to make my first open source contribution. Is this feature still needed? If so, I can try to do this. |
@MichaelYogar no, sorry, if I decide to do this I will take the existing PR. |
Hi @marwahaha, I really need this feature but it seems like it isn't moving anywhere. Are you sure no help is needed? I'd like to help and create a PR. |
@TimShilov - new development on Moment.js is very slow. You can fork this repository, add the existing PR, and make a package, if you need this feature. |
Something that frustrates me on Moment is that it's hard to debug problems when an
Invalid date
pops somewhere but you don't know where it came from. I think Moment should have a global option to just throw an error on invalid dates.An error screams in your face you have a problem, and come with a stack trace to know where it came from.
Even if someone doesn't want to enable it on production, it'd useful on debugging situations. In my case, though, I'd have it even on production, so errors would pop on Sentry and console, etc.
Additionally, it'd be nice to have a global option to raise if Moment have to fallback to
new Date(d)
due a missing format argument, instead of just showing a warning.The text was updated successfully, but these errors were encountered: