The Macro Date and Time Syntax allows operators to specify how date and time elements should be represented in their filenames and messages. The different types of date/time elements supported include day-of-week, day-of-month, day-of-year (aka "Julian"), hour, minute, second, month, week-of-year and year.
Operators such as the minus sign normally apply to all times and dates in a macro phrase. To apply operators to only part of a macro phrase, use double-quotes to delimit phrases. For example, if today is currently July 5, 2007, a macro of:
Attribute |
Description |
---|---|
A |
DAY-OF-WEEK; minimal numeric. Example: "2" (Sunday=0) |
AAA |
DAY-OF-WEEK; three-letter abbreviation. Example: "Tue" |
AAAA |
DAY-OF-WEEK; full. Example: "Tuesday" |
B |
DAY-OF-WEEK; minimal numeric. Example: "2" (Sunday=1) |
D |
DAY-OF-MONTH; minimal representation. Example: "7" |
DD |
DAY-OF-MONTH; two-digit representation. Example: "07" |
H |
HOUR; minimal representation, 24-hour clock. Example: "7" |
HH |
HOUR; two-digit representation, 24-hour clock. Example: "07" |
HHH |
HOUR; minimal representation, 12-hour clock. Example: "7" |
HHHH |
HOUR; two-digit representation, 12-hour clock. Example: "07" |
II |
am/pm; two-digit representation of "am" or "pm" designation. Example: "pm" |
J |
JULIAN DATE; minimal representation. Example: "7" First day of year is 0. |
JJJ |
JULIAN DATE; three-digit representation. Example: "007" First day of year is 0. |
K |
JULIAN DATE; minimal representation. Example: "7" First day of year is 1. |
KKK |
JULIAN DATE; three-digit representation. Example: "007" First day of year is 1. |
M |
MONTH; minimal numeric representation. Example: "7" First month is 1. |
MM |
MONTH; two-digit numeric representation. Example: "07" First month is 1. |
MMM |
MONTH; short representation. Example: "Jan" |
MMMM |
MONTH; full representation. Example: "January" |
S |
SECOND; minimal representation. Example: "7" |
SS |
SECOND; two-digit representation. Example: "07" |
T |
MINUTE; minimal representation. Example: "7" |
TT |
MINUTE; two-digit representation. Example: "07" |
W |
WEEK-OF-YEAR; minimal representation. First week is numbered 0. Example: "2" |
WW |
WEEK-OF-YEAR; two-digit representation. First week is numbered 0. Example: "02" |
X |
WEEK-OF-YEAR; minimal representation. First week is numbered 1. Example: "2" |
XX |
WEEK-OF-YEAR; two-digit representation. First week is numbered 1. Example: "02" |
YY |
YEAR; two-digit representation. Example: "02" |
YYYY |
YEAR; four-digit representation. Example: "2002" |
+ |
The "+" symbol following any date designation will increment the current date by one unit of time, namely amount of time implied by the designation. The entire date is affected, with rollover from day-to-day, month-to-month, year-to-year, etc. as required. A + after a day designation increments the date by one day; a + after a month designation increments the date by one month, etc. For instance, on June 30, 2003, "[MMM] [DD], [YYYY]" is rendered "Jun 30, 2003", but "[MMM] [DD+], [YYYY]" is rendered "Jul 1, 2003". |
- |
The "-" symbol following any date designation will decrement the current date by one unit of time, namely the amount of time implied by the designation. The entire date is affected, as with "+". Hence, [MMM-] decrements the date by one month, etc. |