Skip to content

Instantly share code, notes, and snippets.

@s-hiiragi
Last active April 2, 2024 12:25
Show Gist options
  • Save s-hiiragi/99607a61abc10f7cfa0086f81794185a to your computer and use it in GitHub Desktop.
Save s-hiiragi/99607a61abc10f7cfa0086f81794185a to your computer and use it in GitHub Desktop.
Convert Twitter Status Id to DateTime
const status_id = BigInt(prompt('Input Status Id', ''));
const timestamp = Number((status_id >> 22n) + 1288834974657n);
const s = new Date(timestamp).toLocaleString();
console.log(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment