I just tested the change function of the date type and it seems like there is a bug with it: I first created a new date and gave it the value of current date time to then see how it behaves when I change the hour, minutes, seconds, day, year or month.
The problem is: sometimes it works well, sometimes it doesn’t.
For instance, sometimes:
- I change month to 5 (May), and the result is June;
- I change the month, but the hour changes instead;
- when I change all at the same time: seconds, minutes, hour, and day to 0, the result is never the same;
I need that function for my app because I want all the dates to have the same value for seconds, minutes, hours and days, so that I could just focus on month and year values.