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
today is 2021-01-30,
` const dayjs = require('dayjs') const today = dayjs() const jan = '2021-01' const feb = '2021-02'
console.log(diff of today - jan = ${today.diff(jan, 'M')}) console.log(diff of today - feb = ${today.diff(feb, 'M')})
diff of today - jan = ${today.diff(jan, 'M')}
diff of today - feb = ${today.diff(feb, 'M')}
diff of today - jan = 0 diff of today - feb = 0 `
what's the logic behind?
How can I get natural month difference instead of based on days?
thanks
The text was updated successfully, but these errors were encountered:
just pass true as the third argument, and you will see why
Sorry, something went wrong.
hmm, thanks
No branches or pull requests
today is 2021-01-30,
`
const dayjs = require('dayjs')
const today = dayjs()
const jan = '2021-01'
const feb = '2021-02'
console.log(
diff of today - jan = ${today.diff(jan, 'M')}
)console.log(
diff of today - feb = ${today.diff(feb, 'M')}
)diff of today - jan = 0
diff of today - feb = 0
`
what's the logic behind?
How can I get natural month difference instead of based on days?
thanks
The text was updated successfully, but these errors were encountered: