const formatter = new Intl.RelativeTimeFormat("en"); const t1 = 1709042520000; const t2 = 1709042400000; // Date diff & convert from ms to minutes const diff = (t2 - t1) / 60 / 1000; formatter.format(diff, "minutes");
2 minutes ago