You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a date object created with tz, adding 3 months if not setting the day of the month correctly.
When I revert back to using dayjs() it outputs 4th of October.
dayjs.tz.setDefault('Australia/Sydney');
const today = dayjs().tz();
console.log('TODAY', today.format()); // => 4th of July 2021
console.log('ADD 3 Months', today.add(3, 'month')); // => 1th of October
Expected behavior
console.log('TODAY', today.format()); // => 4th of July 2021
console.log('ADD 3 Months', today.add(3, 'month')); // => 4th of October
Information
Day.js Version 1.10.5
OS: MacOS
Node 14
Time zone: [Sydney/Australia]
The text was updated successfully, but these errors were encountered:
When using a date object created with
tz
, adding 3 months if not setting the day of the month correctly.When I revert back to using
dayjs()
it outputs 4th of October.Expected behavior
Information
1.10.5
The text was updated successfully, but these errors were encountered: