token:ICUDateTime
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| token:ICUDateTime [2021/10/20 02:39] – peternlewis | token:ICUDateTime [2023/01/03 05:19] (current) – ccstone | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| The parameters are specified between `%` signs after the main ICDDateTime token. | The parameters are specified between `%` signs after the main ICDDateTime token. | ||
| - | * %**ICUDateTime**%<color #22b14c>[output date format]</ | + | * %**ICUDateTime**%*[output date format]*% |
| * Returns the current date and time in the specified format. | * Returns the current date and time in the specified format. | ||
| - | * %**ICUDateTimeFor**%<color blue>< | + | |
| - | * Returns Date/Time specified by the [[:unixtime|Unix Time]], in the user's local time zone. | + | |
| - | * %**ICUDateTimePlus**%< | + | |
| - | * Returns Date/Time calculated by the Current Date/Time PLUS the <color blue>< | + | |
| - | * %**ICUDateTimeMinus**%< | + | |
| - | * Returns Date/Time calculated by the Current Date/Time MINUS the <color blue>< | + | |
| + | * %**ICUDateTimeFor**%*[unixtime]*%*[output date format]*% | ||
| + | * Returns Date/Time specified by the [[: | ||
| + | * %**ICUDateTimePlus**%*[amount of time]*%*[unit of time]*%*[output date format]*% | ||
| + | * Returns Date/Time calculated by the Current Date/Time **plus** the *[amount of time]*. | ||
| + | * %**ICUDateTimeMinus**%*[amount of time]*%*[unit of time]*%*[output date format]*% | ||
| + | * Returns Date/Time calculated by the Current Date/Time **minus** the *[amount of time]*. | ||
| - | where \\ | + | where: |
| - | * angle brackets <color blue>< | + | * *[output date format]* must conform to the [ICU Date/Time codes](https:// |
| - | | + | * *[unixtime]* is the total number of seconds since the start of 1970, GMT (see [[: |
| - | *The _text-only_ parameters must be plain text, and be a valid choice for that parameter. | + | * *[unit of time]* is a unit as described below. |
| - | * <color #22b14c>[output date format]</ | + | * *[amount |
| - | * <color blue>< | + | |
| - | * <color blue>< | + | |
| - | * <color #22b14c>[unit of time]</ | + | |
| Line 70: | Line 68: | ||
| The **format** is a specified with an [ICU Date Time Format Specifier](http:// | The **format** is a specified with an [ICU Date Time Format Specifier](http:// | ||
| - | Keep in mind that TIME is in GMT and the output of ICUDateTimeFor is in local time, so when doing this sort of thing it is best to use midday instead of midnight: | + | You can use the *Insert ICU Date Field* menu in the *Edit* menu to insert various ICU Date Field format tokens. The *Insert ICU Date Field by Name…* menu item may be particularly helpful to quickly insert field components. |
| + | |||
| + | Keep in mind that [[: | ||
| ``` | ``` | ||
| Line 80: | Line 80: | ||
| ===== Using Variables with These Date/Time Tokens ===== | ===== Using Variables with These Date/Time Tokens ===== | ||
| - | You can use a number, Variable, and formula using Variables, | + | You can use any [[manual: |
| - | + | ||
| - | %**ICUDateTimePlus**%< | + | |
| - | + | ||
| - | where \\ | + | |
| - | | + | |
| - | * square brackets <color # | + | |
| The _text-only_ parameters must be plain text, and be a valid choice for that parameter. | The _text-only_ parameters must be plain text, and be a valid choice for that parameter. | ||
token/ICUDateTime.1634697584.txt.gz · Last modified: by peternlewis
