A timestamp is a number used to represent a fixed point in a time.

Unlike date strings, which are relative to a specific timezone or location, a timestamp is absolute, and represents the same moment regardless of where a person lives.

Today, we’re going to look at how to work with timestamps in vanilla JS.

Unix time

Unix time is the amount of time that have elapsed since midnight on January 1, 1970, UTC.

It’s a commonly used measure of time in operating systems and programming, and provides a handy way to create timestamps.

#vanilla #javascript

How to Create and Work with Timestamps in Vanilla JavaScript
2.60 GEEK