Hi Razvan,
The addDays functionality will move the date into 2019, as you would expect. You can test this by making a simple microflow that does the following:
- Create a Date and time variable (I named it $Date) with value: dateTime(2018, 12, 24, 12, 0, 0)
- Change the variable: addDays($Date, 9)
If you debug this microflow, you will see the following value after the change variable activity:
UTC time: 2019-01-02 10:00:00.000
Session time: 2019-01-02 12:00:00.000 +0200
If you are getting different results in your current setup, either [%BeginOfCurrentWeekUTC%] or $WeekDifferenceInDays is incorrect (or both). My guess is that the date & time on the machine you're developing on (or the server where you are testing) might not be set correctly.
Good luck!
Hi Razvan,
Did you already check out the documentation on 'Add date function calls'?
https://docs.mendix.com/refguide/add-date-function-calls
In your case probably: addDays($yourDate, 9) , uses the server's calendar
or for UTC: addDaysUTC($yourDate, 9) , uses the UTC calendar
Regards,
Roel