Uses UTC. Try
function daysSince2000() { return (Date.now() - Date.UTC(2000, 0, 1)) / 86400000; } console.log(daysSince2000());
use Luxon or Day.js lightweight and handle UTC offsets and time zones much better compare to Date object.
Date