We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When parsed from the string to a dayjs instance, the month value is shifted. Expected behavior
input
var dayjs = require("dayjs") var customParseFormat = require('dayjs/plugin/customParseFormat') dayjs.extend(customParseFormat) console.log(dayjs("1996-02-02", "YYYY-MM-DD").month()); console.log(dayjs("1996-05-02", "YYYY-MM-DD").month());
output
2 5
Information
The text was updated successfully, but these errors were encountered:
Dayjs use 0 based month the same as the native Date object.
You can use dayjs().format('MM') to get the result you want.
dayjs().format('MM')
Sorry, something went wrong.
@iamkun Thank you! I'll try it.
No branches or pull requests
Describe the bug
When parsed from the string to a dayjs instance, the month value is shifted.
Expected behavior
input
output
Information
The text was updated successfully, but these errors were encountered: