Skip to content
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

Setting .isDate = true then .isDate = false should clear hour/minute/second values #501

Open
darktrojan opened this issue Mar 27, 2022 · 0 comments

Comments

@darktrojan
Copy link
Collaborator

After this code:

var t = new Time({ second: 56, minute: 34, hour: 12, day: 1, month: 1, year: 2022 });
t.isDate = true;
t.isDate = false;

t.hour, t.minute, and t.second should be 0, but they aren't, because t isn't normalised at any point.

I think the best thing to do is just clear the values in the setTimeAttr special case, but I haven't yet considered the implications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants