Macro Symbols are used to display a dynamic date or portions of a date
relevant to the current context.
Macro Symbols are divided into two categories: 1) simplified and 2) standard.
Macro Symbol Support
Macro Symbols are supported in the <cal:title> and <cal:click> tags.
Specifically, the titleFormat and toRangeFormat attributes of the <cal:title> tag and
the jscript, link, and fieldFormat attributes of the <cal:click> tag may contain Macro Symbols.
Macro Symbol Usage
An example of Macro Symbol usage is in the default title for monthTitle
and is defined as:
<cal:title name='monthTitle' titleFormat='$MMM, $YYYY'/>.
Macro Symbol Content
A macro is a simplified identifier of '$' or a standard identifier of '#'
followed by one or more symbols. Simplified and standard macros cannot be mixed
in the same tag attribute instance.
The supported simplified ($) symbols are:
| Symbol |
Meaning | Presentation | Example |
| G | era designator | (Text) | AD |
| Y | year | (Number) | 1996 |
| M | month in year | (Text & Number) | July & 07 |
| D | day in month | (Number) | 10 |
| h | hour in am/pm (1~12) | (Number) | 12 |
| H | hour in day (0~23) | (Number) | 0 |
| m | minute in hour | (Number) | 30 |
| s | second in minute | (Number) | 55 |
| n | millisecond | (Number) | 978 |
| E | day in week | (Text) | Tuesday |
| w | week in year | (Number) | 27 |
| W | week in month | (Number) | 2 |
| A | am/pm marker | (Text) | PM |
| z | time zone | (Text) | Pacific Standard Time |
The count of pattern letters determine the format as defined for standard symbols.
The exception is that for text of length < 3 the text is truncated to the length.
The supported standard (#) symbols are:
| Symbol | Meaning | Presentation | Example |
| G | era designator | (Text) | AD |
| y | year | (Number) | 1996 |
| M | month in year | (Text & Number) | July & 07 |
| d | day in month | (Number) | 10 |
| h | hour in am/pm (1~12) | (Number) | 12 |
| H | hour in day (0~23) | (Number) | 0 |
| m | minute in hour | (Number) | 30 |
| s | second in minute | (Number) | 55 |
| S | millisecond | (Number) | 978 |
| E | day in week | (Text) | Tuesday |
| D | day in year | (Number) | 189 |
| F | day of week in month | (Number) | 2 (2nd Wed in July) |
| w | week in year | (Number) | 27 |
| W | week in month | (Number) | 2 |
| a | am/pm marker | (Text) | PM |
| k | hour in day (1~24) | (Number) | 24 |
| K | hour in am/pm (0~11) | (Number) | 0 |
| z | time zone | (Text) | Pacific Standard Time |
The count of pattern letters determine the format.
(Text): 4 or more pattern letters--use full form, less than 4--use short or abbreviated form if one exists.
(Number): the minimum number of digits. Shorter numbers are zero-padded to this amount.
Year is handled specially; that is, if the count of 'y' is 2, the Year will be truncated to 2 digits.
(Text & Number): 3 or over, use text, otherwise use number.
|
|
|