Template:Event timer/doc: Difference between revisions

Jump to navigation Jump to search
date formats, note on cache purging. wip
(basic examples. wip)
(date formats, note on cache purging. wip)
Line 7: Line 7:
Full usage:
Full usage:
<pre>{{Event timer | Start = | End = | Message = | End message = | Future message = | Today = }}</pre>
<pre>{{Event timer | Start = | End = | Message = | End message = | Future message = | Today = }}</pre>
<div style="width:80%; background-color: lemonchiffon; border: 2px solid darkgoldenrod; text-align: center; margin:auto;">NOTE! <br> The template doesn't work in real time, but receives the current day from the server when a new cache is loaded. As such, the template is prone to "getting stuck". If that happens, you can purge the cache. Consider including the [[Template:Purge]] in your message for user convenience.</div>


=== Parameters ===
=== Parameters ===
Line 21: Line 23:


=== Dates ===
=== Dates ===
The template uses parser function <nowiki>{{#time: }}</nowiki>, which can intepret several different date formats. At least the following formats work in the template:
{| class="wikitable"
! Format !! Example
|-
| colspan="2" bgcolor=#343434 style="text-align:center; color:white;" | '''Recommended'''
|-
| Day number + Month name || 9 October
|-
| Month name + Day number || October 9
|-
| Day number + Month Abbr. || 9 Oct
|-
| Month Abbr. + Day number || Oct 9
|-
| Month/Day (US style) || 10/9
|-
| colspan="2" bgcolor=#343434 style="text-align:center; color:white;" | '''Other'''
|-
| Month<ref group="note">Do not include the year when using only the name of the month.</ref> || Oct <br> October
|-
| ISO<ref group="note">Including the year is mandatory, even if it's ignored. The year can be any year.</ref> || 2023-10-09
|-
| Weekdays<ref group="note">Will find the ''next'' weekday given! As such, the value "Wednesday" will refer to Wednesday this week on Monday, Tuesday and Wednesday, but to the next week's Wednesday on all the other days.</ref> || Tue <br> Tuesday
|}
<small><references group="note"/></small>


== Examples ==
== Examples ==
1,769

edits

Navigation menu