vegeta897/snow-stamp

Add coder help section

Opened this issue · 0 comments

A number of people have asked me how they can use the snow-stamp site in their code to convert snowflakes to timestamps. There is an impression that whatever my site is doing it can't be done locally in one line of code.

An expandable info section should be added to the page that explains how to derive the unix milliseconds from snowflake IDs. A JS code snippet could be included like so:

let timestamp = new Date(mySnowflake / 4194304 + 1420070400000)