Scheduling, running, and managing designs : Using a date-and-time expression in a document or version name : Creating a custom date format
 
Creating a custom date format
You can create custom date formats. The exact output depends on the locale. iHub formats dates that appear in the Management Console user interface according to specifications in the locale map that Management Console uses.
If you update localemap.xml, you must restart the cluster nodes for the changes to take effect. You must also ensure that localemap.xml uses the correct encoding and that you store localemap.xml in the correct locations.
A locale definition in localemap.xml does not necessarily specify a value for every field. For a field with no specified value, iHub uses the default locale’s value meaning for that field. If no default locale exists in the file, iHub uses a hard‑coded value from the C locale.
In a cluster, the same file must reside on every iHub machine to achieve consistency among nodes.
Table 5‑7 lists the date format symbols that you can use to construct a custom date format and the expression to which each variable evaluates in a document. Examples and results that have a file-name extension are document names. Examples and results without a file-name extension are version names. The results are for the English (US) locale.
Table 5‑7 Date format variables
Symbol
Description
Example
Result
d
Returns day of the month without a leading zero (1‑31)
Day{d}.<document extension>
Day3.<document extension>
dd
Returns day of the month with a leading zero (01‑31)
Day{dd}.<document extension>
Day03.<document extension>
ddd
Returns the three‑letter abbreviation for the day of the week
{ddd}.<document extension>
Tue.<document extension>
dddd
Returns the full name of the day of the week
{dddd}
Tuesday
ddddd
Returns the short date
{ddddd}
01/23/2006
dddddd
Returns the long date
{dddddd}.<document extension>
Monday, January 23, 2006.<document extension>
w
Returns the day of the week as a number, where Sunday = 1 and Saturday = 7
Weekday {w}.<document extension>
Weekday 3.<document extension>
ww
Returns the week of the year (1‑53)
Week {ww}.<document extension>
Week 4.<document extension>
m
Returns the number of the month without the leading zero (1‑12)
Month {m}.<document extension>
Month1.<document extension>
mm
Returns the number of the month with the leading zero
Month {mm}.<document extension>
Month 01.<document extension>
mmm
Returns the three-letter abbreviation for the month’s name
{mmm}.<document extension>
Jan.<document extension>
mmmm
Returns the full name of the month
{mmmm}.<document extension>
January.<document extension>
q
Returns the number of the quarter (1‑4)
Quarter {q}.<document extension>
Quarter 1.<document extension>
y
Returns the number of the day of the year (1‑365)
Day {y}.<document extension>
Day 23.<document extension>
yy
Returns the last two digits of the year (00‑99)
Year {yy}.<document extension>
Year 01.<document extension>
yyy or yyyy
Returns all four digits of the year (1000‑9999)
Year {yyy}.<document extension>
Year 2006.<document extension>
c
Returns the date variant as dddd
For {dddd}
For 01/23/2006 or for 01‑23‑2006
A syntax error can occur if you use certain unescaped literal characters or strings in a date expression that also uses a user-defined date-and-time format. For example, the following expression produces a syntax error described by the message in quotation marks:
Sales Report for MMM company as of {Date - mm/dd/yy}
"Bad format specification in token - {Date - mm/dd/yy}."