-
-
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
Issue formatting 02/20 #711
Comments
https://runkit.com/embed/ydhiaf56iwjl please provide a valid reproduction link |
Odd, just cloning that example I see a different result, no changes. |
I got the same results as ☝️ "03" |
This is because if no 'day' provided, dayjs will use current 'day'. But we might change it to the first day of the month. And 02-31 -> 03-01. |
fixed in #761 and will use the first day of the month while there's no 'day' provided. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
const month = dayjs.utc(02/20, 'MM/YY').format('MM')
const year = dayjs.utc(02/20, 'MM/YY').format('YYYY')
The above returns:
month = 03
year = 2020
Expected behavior
month = 02
year = 2020
Additional Information
I think this is a leap year issue
Information
The text was updated successfully, but these errors were encountered: