<$mt:Date$>
Outputs the current date.
Attributes:
- ts (optional)
If specified, will use the given date as the date to publish. Must be in the format of "YYYYMMDDhhmmss".
- relative (optional)
If specified, will publish the date using a phrase, if the date is less than a week from the current date. Accepted values are "1", "2", "3" and "js". The options for "1", "2" and "3" affect the style of the phrase.
- relative="1"
Supports display of one duration: moments ago; N minutes ago; N hours ago; N days ago. For older dates in the same year, the date is shown as the abbreviated month and day of the month ("Jan 3"). For older dates, the year is added to that ("Jan 3 2005").
- relative="2"
Supports display of two durations: less than 1 minute ago; N seconds, N minutes ago; N minutes ago; N hours, N minutes ago; N hours ago; N days, N hours ago; N days ago.
- relative="3"
Supports display of two durations: N seconds ago; N seconds, N minutes ago; N minutes ago; N hours, N minutes ago; N hours ago; N days, N hours ago; N days ago.
- relative="js"
When specified, publishes the date using JavaScript, which relies on a MT JavaScript function 'mtRelativeDate' to format the date.
- relative="1"
- format (optional)
A string that provides the format in which to publish the date. If unspecified, the default that is appropriate for the language of the blog is used (for English, this is "%B %e, %Y %l:%M %p"). The format specifiers supported are:
- %Y
The 4-digit year. Example: "1999".
- %m
The 2-digit month (zero-padded). Example: for a date in September, this would output "09".
- %d
The 2-digit day of the month (zero-padded). Example: "05".
- %H
The 2-digit hour of the day (24-hour clock, zero-padded). Example: "18".
- %M
The 2-digit minute of the hour (zero-padded). Example: "09".
- %S
The 2-digit second of the minute (zero-padded). Example: "04".
- %w
The numeric day of the week, in the range
0-6, where0isSunday. Example: "3". - %j
The numeric day of the year, in the range
0-365. Zero-padded to three digits. Example: "040". - %y
The two-digit year, zero-padded. Example: %y for a date in 2008 would output "08".
- %b
The abbreviated month name. Example: %b for a date in January would output "Jan".
- %B
The full month name. Example: "January".
- %a
The abbreviated day of the week. Example: %a for a date on a Monday would output "Mon".
- %A
The full day of the week. Example: "Friday".
- %e
The numeric day of the month (space-padded). Example: " 8".
- %I
The two-digit hour on a 12-hour clock padded with a zero if applicable. Example: "04".
- %k
The two-digit military time hour padded with a space if applicable. Example: " 9".
- %l
The hour on a 12-hour clock padded with a space if applicable. Example: " 4".
- %Y
- format_name (optional)
Supports date formatting for particular standards.
- rfc822
Outputs the date in the format: "%a, %d %b %Y %H:%M:%S Z".
- iso8601
Outputs the date in the format: "%Y-%m-%dT%H:%M:%SZ".
- rfc822
- utc (optional)
Converts the date into UTC time.
- offset_blog_id (optional)
Identifies the ID of the blog to use for adjusting the time to blog time. Will default to the current blog in context if unset.
- language (optional)
Used to force localization of the date to a specific language. Accepted values: "cz" (Czechoslovakian), "dk" (Scandinavian), "nl" (Dutch), "en" (English), "fr" (French), "de" (German), "is" (Icelandic), "ja" (Japanese), "it" (Italian), "no" (Norwegian), "pl" (Polish), "pt" (Portuguese), "si" (Slovenian), "es" (Spanish), "fi" (Finnish), "se" (Swedish). Will use the blog's date language setting as a default.

Leave a note
Have a question, please use the MT Forums. Notes sumbitted here should pertain to tips & hints regarding documentation. Your note may be removed once it's contents has be integrated into the body of the page.