Skip to content

date-in-finnish

View the code on GitHub

A little script which generates the current date in Finnish, and tells you the cardinal and ordinal number of today's date.

I have this set up in an automation in the iOS Shortcuts app:

The automation configuration screen: the trigger is 'when my wake-up alarm is stopped' and the actions are 'Run Inline Script' and 'Show Notification'.

The first action uses the app Scriptable to run some JavaScript, which is the contents of date-in-finnish.js plus the code to run it:

// contents of date-in-finnish.js
// ...

return dateInFinnish.getForToday({
  dateFormat: {
    weekday: 'long',
    day: 'numeric',
    month: 'long',
  },
  outputFormat: `Tänään on [formattedDate]
([cardinal] → [ordinal])`,
})
The automation actions screen: 'Run Inline Script' followed by 'Show Notification: Output'.

So every morning it sends me a notification like this:

An example notification with the current date in Finnish, plus the cardinal and ordinal number written out.

Pretty useful to practise saying dates and learning the cardinal and ordinal numbers.