mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-04 00:56:17 +00:00
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
title: Date Formats
|
|
modifier: matt
|
|
created: 20110216113958
|
|
modified: 20110221141513
|
|
creator: colmbritton
|
|
|
|
Several [[Macros|MacrosContent]] including the [[Today Macro|today macro]] take a [[Date Format String|Date Formats]] as an optional argument. This string can be a combination of ordinary text, with some special characters that get substituted by parts of the date:
|
|
* {{{DDD}}} - day of week in full (eg, "Monday")
|
|
* {{{ddd}}} - short day of week (eg, "Mon")
|
|
* {{{DD}}} - day of month
|
|
* {{{0DD}}} - adds a leading zero
|
|
* {{{DDth}}} - adds a suffix
|
|
* {{{WW}}} - ~ISO-8601 week number of year
|
|
* {{{0WW}}} - adds a leading zero
|
|
* {{{MMM}}} - month in full (eg, "July")
|
|
* {{{mmm}}} - short month (eg, "Jul")
|
|
* {{{MM}}} - month number
|
|
* {{{0MM}}} - adds leading zero
|
|
* {{{YYYY}}} - full year
|
|
* {{{YY}}} - two digit year
|
|
* {{{wYYYY}}} - full year with respect to week number
|
|
* {{{wYY}}} two digit year with respect to week number
|
|
* {{{hh}}} - hours
|
|
* {{{0hh}}} - adds a leading zero
|
|
* {{{hh12}}} - hours in 12 hour clock
|
|
* {{{0hh12}}} - hours in 12 hour clock with leading zero
|
|
* {{{mm}}} - minutes
|
|
* {{{0mm}}} - minutes with leading zero
|
|
* {{{ss}}} - seconds
|
|
* {{{0ss}}} - seconds with leading zero
|
|
* {{{am}}} or {{{pm}}} - lower case AM/PM indicator
|
|
* {{{AM}}} or {{{PM}}} - upper case AM/PM indicator
|
|
|
|
!!!!Examples
|
|
{{{DDth MMM YYYY}}} - 16th February 2011
|
|
{{{DDth mmm hh:mm:ss}}} - 16th Feb 2011 11:38:42
|