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
Fixes some comparison issues #15583
Fixes some comparison issues #15583
Conversation
@@ -63,7 +63,7 @@ | |||
}, | |||
|
|||
getDateRange: function () { | |||
return [this.dateInPeriod, this.dateInPeriod]; | |||
return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to ensure new date objects are returned here. Otherwise only references for this.dateInPeriod
were returned, causing problems when they were manipulated. (That caused day periods compared two years back)
LGTM |
Hello there! |
The «interval» bug is confirmed also for month period |
* ensure new date objects are returned * return chosen period when comparing with previous year
* ensure new date objects are returned * return chosen period when comparing with previous year Co-authored-by: Stefan Giehl <stefan@matomo.org>
* ensure new date objects are returned * return chosen period when comparing with previous year Co-authored-by: Stefan Giehl <stefan@matomo.org>
fixes #15194, #15193