Skip to content

Instantly share code, notes, and snippets.

@enzoBrum
Created September 29, 2024 17:48
Show Gist options
  • Select an option

  • Save enzoBrum/f1ec1de9b9e0d6a4ad15c253b37fdd80 to your computer and use it in GitHub Desktop.

Select an option

Save enzoBrum/f1ec1de9b9e0d6a4ad15c253b37fdd80 to your computer and use it in GitHub Desktop.
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)
Script.complete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment