Milliseconds to date converter
Converts a millisecond timestamp — the thirteen-digit kind `Date.now()` returns — into a date, and into every other epoch alongside.
How to use the milliseconds to date converter
JavaScript is the main source of these, and the mismatch with the rest of the world is a constant source of off-by-a-thousand bugs: `Date.now()` gives milliseconds while a database `to_timestamp()`, a Python `time.time()` and most APIs give seconds. Passing one where the other is expected does not error, it just produces a date in 1970 or in the far future, which is why it survives code review. If you are storing timestamps, pick one unit and be explicit in the column name — `created_at_ms` costs nothing and prevents the whole class of bug.
Questions
A choice made in 1995 and never revisited. Almost everything else uses seconds, which is the source of endless off-by-a-thousand bugs.