This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
token:ICUDateTime [2019/07/01 02:57] peternlewis |
token:ICUDateTime [2020/05/28 17:16] JMichaelTX [Using Variables with These Date/Time Tokens] Clarify use of Parameters |
||
---|---|---|---|
Line 64: | Line 64: | ||
===== Using Variables with These Date/Time Tokens ===== | ===== Using Variables with These Date/Time Tokens ===== | ||
- | To use a Variable instead of a number in a token, like the ICUDateTimePlus token, just enter the Variable name without any additional %, as in: | + | You can use a number, Variable, and formula using Variables, in the _numeric_ parameters, like the amount of time in the ICUDateTimePlus token, which has this format: \\ |
+ | |||
+ | %**ICUDateTimePlus**%<color blue><amount of time></color>%<color #22b14c>[unit of time]</color>%<color #22b14c>[output date format]</color>% | ||
+ | |||
+ | where \\ | ||
+ | * angle brackets <color blue>< ></color> denote a numeric parameter, may use a Variable and/or formula | ||
+ | * square brackets <color #22b14c>[ ]</color> denote a text-only parameter, cannot use a Variable | ||
+ | |||
+ | The _text-only_ parameters must be plain text, and be a valid choice for that parameter. | ||
+ | |||
+ | **Examples** | ||
``` | ``` | ||
- | %ICUDateTimePlus%3%Days%yyyyMMdd% | + | %ICUDateTimePlus%3%Days%MM/dd/yyyy% |
- | %ICUDateTimePlus%YourVariableName%Days%yyyyMMdd% | + | %ICUDateTimePlus%myAmountOfTime%Days%yyyyMMdd% |
+ | %ICUDateTimePlus%myBaseNumber + 3%Months%yyyy-MM-dd% | ||
``` | ``` | ||
- | For an example, see [Generate File Named Based on Day of Week [Example]](https://forum.keyboardmaestro.com/t/dates-generate-file-named-based-on-day-of-week-example/4562) | + | Also See |
+ | |||
+ | * [[https://forum.keyboardmaestro.com/t/icu-time-multiple-variables/18181/2?u=jmichaeltx|Discussion of Using Variables With ICUDateTime]] | ||
+ | * [Generate File Named Based on Day of Week [Example]](https://forum.keyboardmaestro.com/t/dates-generate-file-named-based-on-day-of-week-example/4562) | ||
===== Localization ===== | ===== Localization ===== |