Date manipulation


I'm trying to get the last monday before a specified date.
I got the date from a query and the returned date is nov 21.

But in the log I got nov 20, I don't understand why, any guidance ?


And in the database :


If I use :

var maxDate = new Date();

My function works perfectly.

Use moment()

1 Like

Hi @Nicolas_Le_Jeune,

Did moment work? Something like this:

If that doesn't help, I'm guessing theres an issue with timezones :thinking:

It worked perfectly ! Thank you :slight_smile:

1 Like