####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/d/d75dcead5b3bd93e7f2793045e5264d95406f259.kmmacros">Date Calculator with Setup Options.kmmacros</a> (19 KB)
If anyone finds any issues/bugs, or has suggestions for improvement, please let me know.
---
###ReleaseNotes
TopicTitle: Date Calculator
Forum: Keyboard Maestro Discourse, macro
Post by: @Tom
Post Date: 2016-10-18
Script Lang: KM Macro
Post URL: https://forum.keyboardmaestro.com/t/date-calculator/5260?u=jmichaeltx
A Typed String example to calculate dates ahead of today and before today. Inspired by Typinator’s dayDelta1 and @peternlewis’ Calculation macro1.
Usage
Type…
today+20d → Date 20 days ahead
today+3w → Date 3 weeks ahead
today+9m → Date 9 months ahead
today-3w → Date 3 weeks ago
You can change the trigger word and customize the date format in the macro.
Related:
Date Calculations1
KM Wiki
Date format syntax
Update (2016-10-18 19:42 Z):
Date token now composed of variables (→ date format easier to customize, less switches).
Thanks to @JMichaelTX
ah NICE`, yeah I was using the modified macro trying to type the original text.
Works nicely, and at least I’m off to a start.
You guys are monsters man! -
very cool, thanx for the nudge~
understood, not sure how to do that, will poke around,
I was able to do a search and replace and get it to work on one date 'type’
I’ll just have to make a few more search and replace’s to cover all the variables. -
sort of country ‘programming’ but it works. =)