26th February 2023 at 2:46pm
Certain fields of a tiddler are used to store dates and times. TiddlyWiki supports dates from the year -9999 to the year 9999.
The two standard date fields are created
and modified
.
Values of date fields are 17 or 18-character strings:
- Introduced in v5.1.23 an optional minus sign
-
to indicate a negative year - 4 digits for the year
- 2 digits for the month
- 2 digits for the day
- 2 digits for the hour
- 2 digits for the minute
- 2 digits for the second
- 3 digits for the millisecond
To avoid problems arising from differences of time zone, TiddlyWiki always uses UTC.
The DateFormat template for storage of dates in these fields is [UTC]YYYY0MM0DD0hh0mm0ss0XXX
.
As an example, the created
field of this tiddler has the value 20150117190213631
.
Dates can be converted to other formats for display:
<$view field="created" format="date" template="DDD DDth MMM YYYY"/>
That renders as:
Saturday 17th January 2015