Skip to content

Instantly share code, notes, and snippets.

@qntm
Last active July 5, 2019 19:10
Show Gist options
  • Save qntm/d92f218ab51bcecdd1075fa1e1fd07b6 to your computer and use it in GitHub Desktop.
Save qntm/d92f218ab51bcecdd1075fa1e1fd07b6 to your computer and use it in GitHub Desktop.
Which year was the longest?
"use strict"
const tai = require("t-a-i")
for (let y = 1961; y <= new Date().getFullYear(); y++) {
const start = tai.unixToAtomic(Date.UTC(y, 0, 1))
const end = tai.unixToAtomic(Date.UTC(y + 1, 0, 1))
console.log(y, end - start)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment