Calendar JSP taglib advanced topics
 Basics     Display     Titles     Fonts     Scrolling     Selection     Day Lists     Advanced Topics     
 
 Macro Symbols     Style Sheets     Reserved     Default Days     Date Formats     Product Versions     
 
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 
Gera designator (Text) AD
Yyear (Number) 1996
Mmonth in year  (Text & Number)  July & 07
Dday in month (Number) 10
hhour in am/pm (1~12) (Number) 12
Hhour in day (0~23) (Number) 0
mminute in hour (Number) 30
ssecond in minute (Number) 55
nmillisecond (Number) 978
Eday in week (Text) Tuesday
wweek in year (Number) 27
Wweek in month (Number) 2
Aam/pm marker (Text) PM
ztime 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 
Gera designator (Text) AD
yyear (Number) 1996
Mmonth in year  (Text & Number)  July & 07
dday in month (Number) 10
hhour in am/pm (1~12) (Number) 12
Hhour in day (0~23) (Number) 0
mminute in hour (Number) 30
ssecond in minute (Number) 55
Smillisecond (Number) 978
Eday in week (Text) Tuesday
Dday in year (Number) 189
Fday of week in month  (Number) 2 (2nd Wed in July)
wweek in year (Number) 27
Wweek in month (Number) 2
aam/pm marker (Text) PM
khour in day (1~24) (Number) 24
Khour in am/pm (0~11)  (Number) 0
ztime 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.