-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow custom parse function for two digit years #1418
Comments
maybe we can support this via a plugin |
Would it be an idea to include it as a plugin option to the existing
|
fixed in #1421 |
Hello, I noticed that in recent versions of dayjs versions, the pivot year seems to be different than the value mentioned above. dayjs('12/31/49').format() -> 2049-12-31T00:00:00+00:00
dayjs('01/01/50').format() -> 1950-01-01T00:00:00+00:00 Cheers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
dayjs
parses a two digit year as 19xx if the value is below 68, otherwise as 20xx.Proposal
A possibility to configure this behavior would be nice. As a use case, we need to parse a two digit year as 19xx if the input is greater than the current year, otherwise as 20xx.
In
moment
this can be configured, e.g.:The text was updated successfully, but these errors were encountered: