Skip to content

Instantly share code, notes, and snippets.

@enzoBrum
enzoBrum / icpc_counter.js
Created September 29, 2024 17:48
Simple scriptable code for creating a countdown until probable brazilian regional ICPC date next year
const goal = new Date(2025, 7, 30)
const delta = Math.floor((goal / 1000 - Date.now() / 1000) / 3600 / 24)
const text = `${delta} days until ICPC`
const widget = new ListWidget()
widget.addText(text)
widget.presentAccessoryCircular()
Script.setWidget(widget)