Date Math with Keyboard Maestro

It might be worth running man date in Terminal.app and looking at the -v adjustment option for the Bash date command.

At the Terminal prompt, where I am sitting,

date -j -v+60d -f %m-%d-%y "6-2-15"

generates

Sat  1 Aug 2015 02:00:56 BST

and you could assemble that kind of string in a Shell Execute action using $KMVAR_variable_name references to your KM variables.

Hence something like:

date delta.kmmacros (2.3 KB)

date -j -v$KMVAR_adjustment -f %m-%d-%y "$KMVAR_base_date"
1 Like