lundi 24 décembre 2018

Compare date and timestamp without timezone

I am using JavaScript and I have a date and a timestamp without time zone and I would like to see if they are equal in a if statement. How do you compare these two formats to see if they are equal.

Date: 2018-12-25T06:00:00+01:00
Timestamp without timezone: 2018-12-25T11:00:00.000Z

var date = Date
var timestamp = Timestamp without timezone
if(date == timestamp){
  console.log("Are the same")
}

Aucun commentaire:

Enregistrer un commentaire