Published
Edited
Jan 19, 2021
4 stars
Insert cell
md`# ${seconds_to_biden.toLocaleString()} second${seconds_to_biden != 1 && 's' || ''} to Biden

That's ${(seconds_to_biden / 3600).toLocaleString()} hours (${(seconds_to_biden / (24 * 3600)).toLocaleString()} days) until 5pm UTC on Wednesday 20th January 2021 (noon US Eastern, 9am US Pacific)`
Insert cell
seconds_to_biden = {
while (true) {
yield Promises.delay(500, Math.max(0, Math.ceil((biden_starts - Date.now()) / 1000)));
}
}
Insert cell
biden_starts = new Date(Date.UTC(2021, 0, 20, 17, 0)) // 5pm UTC on 20th January 2021 - thanks, Toph Tucker
Insert cell
md`I had initially calculated this in Python using:

import datetime, pytz

datetime.datetime.timestamp(
datetime.datetime(2021, 1, 20, 17, 0, tzinfo=pytz.UTC)
)
`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more