Date manipulation

Hi,

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.
image

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

image

And in the database :

image

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