dow
Returns the day of the week of the current time or of a given unix time.
Keyboard Maestro: DOW
Details #
dow(time?) takes zero or one argument and returns a number: 1 for Sunday through 7 for Saturday.
With no argument it reads the current time. With an argument, which is a unix time in seconds (the kind now and time return), it reads that moment instead. It always uses the Mac's local time zone.
Parameters #
Takes 0 to 1 argument.
{{ dow(text?) }}
Examples #
dow()→
5dow(1000000000)→
7dow(time(2026, 10, 24, 15, 30))→
7Gotchas #
Anything that isn't a number is an error:
dow() needs a number, got text.The time must be in seconds, not milliseconds: a value in milliseconds lands tens of thousands of years in the future.
Sunday is 1, not 0, and Monday is 2.