Sometimes we encounter a situation to work with dates by treating them as numbers.

For instance, I had to find a quantile point from an array of dates. O_o

Using the Date.getTime() we could get the milliseconds! ^_^

1
2
3
const todayInMilliseconds = new Date().getTime();

const fromMilliseconds = new Date(todayInMilliseconds);