Last active
July 5, 2019 19:10
-
-
Save qntm/d92f218ab51bcecdd1075fa1e1fd07b6 to your computer and use it in GitHub Desktop.
Which year was the longest?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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