JavaScript Timestamps Support for legacy browsers

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

In older browsers where Date.now() is unavailable, use (new Date()).getTime() instead:

t = (new Date()).getTime();

Or, to provide a Date.now() function for use in older browsers, use this polyfill:

if (!Date.now) {
  Date.now = function now() {
    return new Date().getTime();
  };
}


Got any JavaScript Question?