User Tools

Site Tools


token:ICUDateTime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
token:ICUDateTime [2016/12/28 04:20]
peternlewis [Fields & Format Used by These Tokens]
token:ICUDateTime [2018/06/29 05:32]
peternlewis
Line 9: Line 9:
 * //​%ICUDateTimeFor%NOW()+20%**format**%//​ - the specified [[:​unixtime]] date. * //​%ICUDateTimeFor%NOW()+20%**format**%//​ - the specified [[:​unixtime]] date.
 * //​%ICUDateTimePlus%3+6%Hours%**format**%//​ - the current time plus a specified number of the specified time units. * //​%ICUDateTimePlus%3+6%Hours%**format**%//​ - the current time plus a specified number of the specified time units.
-* //​%ICUDateTimeMinus%3*6%Hours%**format**%//​ - the current time minus a specified number of the specified time units.+* //​%ICUDateTimeMinus%3+6%Hours%**format**%//​ - the current time minus a specified number of the specified time units. 
  
 ===== Time Units ===== ===== Time Units =====
Line 22: Line 23:
 * Months * Months
 * Years * Years
 +* Sundays
 +* Mondays
 +* Tuesdays
 +* Wednesdays
 +* Thursdays
 +* Fridays
 +* Saturdays
 +
 +==== Using Plus 0 or 1 With Day of Week (v8+) ====
 +
 +*  If the //Time Unit// is a day of the week (//​Sundays//​ thru //​Saturdays//​)
 +  * **If you use a Plus 0** (//​%ICUDateTimePlus%**0**%//​),​ \\
 +it will return the next appropriate day for that day of week, possibly returning today if it is the same day of week as entered;
 +    * So if Today is //​Tuesday//,​ and you use //​%ICUDateTimePlus%0%Tuesdays%//,​ then it will return Today'​s date.
 +    * Whereas, if you use //​%ICUDateTimePlus%0%Wednesdays%//,​ it will return tomorrow'​s date.
 +  * **If you use Plus 1** (//​%ICUDateTimePlus%**1**%//​),​ \\
 +it will return the next appropriate day, strictly after Today. ​
 +
 +=== Examples ===
 +
 +
 +For example, if today is Tuesday, September 5, 2017, you would get these results:
 +
 +^Token^Result^
 +| %ICUDateTimePlus%0%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%1%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%2%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%0%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%1%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%2%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%0%Mondays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%1%Mondays%EEE,​ MMM d, yyyy% \\ %ICUDateTimePlus%2%Mondays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%0%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%1%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%2%Tuesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%0%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%1%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%2%Wednesdays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%0%Mondays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%1%Mondays%EEE,​ MMM d, yyyy% \\ %ICUDateTimeMinus%2%Mondays%EEE,​ MMM d, yyyy% | Tue, Sep 5, 2017 \\ Tue, Sep 12, 2017 \\ Tue, Sep 19, 2017 \\ Wed, Sep 6, 2017 \\ Wed, Sep 6, 2017 \\ Wed, Sep 13, 2017 \\ Mon, Sep 11, 2017 \\ Mon, Sep 11, 2017 \\ Mon, Sep 18, 2017 \\ Tue, Sep 5, 2017 \\ Tue, Aug 29, 2017 \\ Tue, Aug 22, 2017 \\ Wed, Aug 30, 2017 \\ Wed, Aug 30, 2017 \\ Wed, Aug 23, 2017 \\ Mon, Sep 4, 2017 \\ Mon, Sep 4, 2017 \\ Mon, Aug 28, 2017 |
 +
 +Note how Plus 0 and Plus 1 are the same unless today is the same as the weekday. ​ Also note that Plus 0 and Minus 0 is not the same (except when today is the same as the weekday).
  
 ===== Format Specification ===== ===== Format Specification =====
Line 47: Line 75:
  
 ===== See Also ===== ===== See Also =====
- 
----- 
  
 === Actions === === Actions ===
Line 85: Line 111:
 * [[:​JulianDate|JulianDate]] * [[:​JulianDate|JulianDate]]
 * [[:​unixtime]] in GMT * [[:​unixtime]] in GMT
- 
----- 
  
 ==== Forum ==== ==== Forum ====
Line 93: Line 117:
 - [[https://​forum.keyboardmaestro.com/​t/​if-then-condition-to-run-only-during-date-range/​4485/​3|If...then...condition to run only during date range]] - [[https://​forum.keyboardmaestro.com/​t/​if-then-condition-to-run-only-during-date-range/​4485/​3|If...then...condition to run only during date range]]
  
-- [[https://www.google.fr/search?q=site:​forum.keyboardmaestro.com+ICUDateTime+token|Keyboard Maestro Forum topics about %ICUDateTime% token]]+- [[https://forum.keyboardmaestro.com/​search?​q=ICUDateTime|Keyboard Maestro Forum topics about %ICUDateTime% token]]
token/ICUDateTime.txt · Last modified: 2023/01/03 00:19 by ccstone