const d1 = new Date("Mon Jan 3 2022 16:38:58 GMT+0530 (India Standard Time)")
const d2 = new Date("2022-01-03T18:30:00Z")
console.log(d1)
console.log(d2)
if (d1 < d2) console.log("Date 1 is earlier than d2")
// To find hh:mm:ss difference for the same day we can do this.
console.log(new Date(d2-d1).toISOString().substr(11, 8))