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
Describe the bug
When using the timezone plugin, if the timezone is in UTC, the month() setter function also resets the date property to 1. When the timezone is in any other UTC offset besides 0, or if no .tz is applied, the date stays the same.
Expected behavior
I'd expect month() to only change the month (and only reset the date() property if it's invalid, such as 31 into a 30-day month).
Information
Day.js Version: v1.10.7
OS: MacOS Monteray 12.3
Browser: Brave 1.36.122
Time zone: GMT-05:00 CDT (Central Daylight Time)
The text was updated successfully, but these errors were encountered:
JohnBDonner
changed the title
.month() resets date() property to 1 when in +00:00 UTC timezone.month() resets date property to 1 when in +00:00 UTC timezone
Apr 18, 2022
Describe the bug
When using the timezone plugin, if the timezone is in UTC, the
month()
setter function also resets the date property to1
. When the timezone is in any other UTC offset besides 0, or if no.tz
is applied, the date stays the same.Expected behavior
I'd expect
month()
to only change the month (and only reset thedate()
property if it's invalid, such as 31 into a 30-day month).Information
v1.10.7
The text was updated successfully, but these errors were encountered: