Skip to content

fix setUTCMonth bug #2229

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

Closed
wants to merge 1 commit into from
Closed

fix setUTCMonth bug #2229

wants to merge 1 commit into from

Conversation

rayshen
Copy link

@rayshen rayshen commented Mar 18, 2022

this.month is the real month, but setUTCMonth value is 0 ~ 11, the setUTCMonth function makes an error when this.month == month

for exp:
in JS
const date = new Date(1647585448570); //2022-03-18
date.getUTCMonth(); // return 2
date.setUTCMonth(3);
date.getUTCMonth(); // return 3

In AS
const date = new Date(1647585448570); //2022-03-18
date.getUTCMonth(); // return 2
date.setUTCMonth(3); // set failed
date.getUTCMonth(); // return 2 error

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

this.month is the real month, but setUTCMonth value is 0 ~ 11
@dcodeIO dcodeIO mentioned this pull request Mar 25, 2022
2 tasks
@dcodeIO
Copy link
Member

dcodeIO commented Mar 27, 2022

Thanks, tracked in #2239 including test updates :)

@dcodeIO dcodeIO closed this Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants