Date
July 1, 2025
Tags
so I really like working towards a goal. it really helps me stay motivated by having a visual countdown to keep me on track.
that’s why I built this simple countdown widget for my iPhone. it shows how many days are left until my goal-currently the JLPT N3 exam on December 7 2025.
having this on my home screen keeps me constantly aware of how much time I have left, so I’m less likely to slack off.
here’s how it looks on my home screen:
Here’s how you can set it up as well:
requirements
- any iphone
- scriptable is only available for ios currently
- scriptable
- this is where you’ll paste the code and it’ll display on your home screen
steps
- install the above app on your iphone
- open the app and click the plus(+) button on the top right to create a new script, name the script whatever you’d like
- paste the below code in the editor and run it.
- edit these two lines at the top:
const title = "JLPT N3";
const targetDate = new Date("2025-12-07");change them to whateever you’re counting down to.
- on lines 14-15, you’ll see:
const widgetWidth = 600;
const widgetHeight = 300;these values are customized for ‘my iphone 14 plus’ - they might not look on other iphones. ask chatgpt to adjust it for your model.
- hit run.
- go to your iphone’s ‘home screen’, long press to enter ‘edit mode’, tap +, and search for ‘scriptable’.
- add a ‘medium-sized widget’, place it where you want.
- tap and hold the widget, then select ‘edit widget’, and you’ll see the screen below
- under ‘script’, choose the one you just created and under ‘when interacting’, choose ‘run script’ and you’re done!