localizedDate
Returns the current date or time in the Mac's own format.
Keyboard Maestro: LongDate, ShortDate, NumberDate, LongTime, ShortTime
Details #
localizedDate(part, style) takes exactly two arguments and returns text for the current moment.
part is "date" or "time"; anything other than "time" gives the date. style is "short", "medium", "long" or "full", and an unknown style gives medium. The wording follows the Mac's region and language settings, so it differs between Macs.
Parameters #
Takes 2 arguments.
{{ localizedDate(text, b) }}
Examples #
localizedDate("date", "long")→
January 15, 2026localizedDate("time", "short")→
9:30 AMGotchas #
The result depends on the Mac's region settings; use kmDateTime or date when the text must have a fixed shape.
Always formats the current time; there is no way to hand it another date.