![]() So, for example, if it’s Thursday (which it is as I type this) and I want the date of last Sunday in the format “,” I could call %ICUDateTimePlus%-4%Days%d MMM yyyy% Keyboard Maestro has a token, %ICUDateTimePlus% that allows you to specify a date in the past or future and format it however you like. While I could have the subroutine return a date string, like “,” that would make it difficult to use in macros that want a date string in a different format. Most import, Keyboard Maestro doesn’t have a Date type.There are two reasons I decided to have the subroutine return a number instead of a date: The calculations could be done in the same subroutine, with the difference being that upcoming days return a positive number and previous days return a negative number. And while I’m at it, I should do the same for the most recent Monday, Tuesday, etc. ![]() ![]() The release of Keyboard Maestro 10, with its addition of subroutines, and a couple of recent questions on the Keyboard Maestro forum regarding date calculations got me thinking that I should make a subroutine that calculates how many days it will be until the next Monday, Tuesday, Wednesday, or whatever weekday. Next post Previous post A date calculation Keyboard Maestro subroutine ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |