Difference between revisions of "Draft: New Countdown Template"

From Detective Conan Wiki
(AvidConanContributor moved page Draft: New Countdown Template to Template:NewCountdown: Making a normal page doesn't allow for testing of the template)
(Tag: New redirect)
 
(Replaced the redirect with a draft documentation of the new template)
(Tag: Removed redirect)
Line 1: Line 1:
#REDIRECT [[Template:NewCountdown]]
+
The draft for this template can be found here: [[Template:Countdown/sandbox]]
 +
This page itself is a draft of the documentation that will eventually be moved over to [[Template:Countdown]].
 +
 
 +
== Planned ==
 +
Elements of the template found in this section are either in progress or simply hypothetical. They are used to guide the process of creating the template.
 +
=== Parameters ===
 +
==== 'end_date' ====
 +
*'''Required?:''' Yes<br>
 +
The date that the countdown ends. It can be in any date format that the #time parser function supports.
 +
 
 +
==== 'end_time' ====
 +
*'''Required?:''' Optional<br>
 +
The time that the countdown ends, on the day defined by ''''end date''''. It can be in any time format that the #time parser function supports.<br>
 +
If left blank, the template will default to midnight.
 +
 
 +
==== 'utc_offset' ====
 +
*'''Required?:''' Optional<br>
 +
The time zone of the ''''end_time''' parameter, defined by the number of hours offset from UTC.<br>
 +
If left blank, the template will default to UTC+0.
 +
 
 +
==== 'display_style' ====
 +
*'''Required?:''' Optional<br>
 +
The style of the countdown, which can be either text or a visual clock (created by using a table with invisible borders).
 +
If left blank, the template will default to text.
 +
 
 +
==== 'first_time_unit' ====
 +
*'''Required?:''' Optional<br>
 +
The first time unit to be displayed on the countdown. For example, putting "hours" will create a countdown where the largest unit of time is hours, not days. If ''''first_time_unit'''' is more precise than ''''last_time_unit'''', the template will not return anything.<br>
 +
If left blank, the template defaults to using days.
 +
 
 +
==== 'last_time_unit' ====
 +
*'''Required?:''' Optional<br>
 +
The last time unit to be displayed on the countdown. For example, putting "hours" will create a countdown where the smallest unit of time is hours, not minutes or seconds. If ''''last_time_unit'''' is less precise than ''''first_time_unit'''', the template will not return anything.<br>
 +
If left blank and ''''end_time'''' is also blank, the template defaults to using days. If left blank, but ''''end time'''' is not blank, the template defaults to using seconds.
 +
 
 +
==== 'when_zero' ====
 +
*'''Required?:''' Optional<br>
 +
The message to return or action to do when the countdown reaches zero. This can be used either to display a message or pass on an action to another part of a larger template. ''''display_style'''' does not affect this parameter.<br>
 +
The template will not use a default for this parameter when blank.
 +
 
 +
=== Variables ===
 +
(Note: Check to see if variables can be used in this wiki before writing any documentation for this section)
 +
 
 +
== Usages ==
 +
* Countdown to episode broadcasts and manga file releases
 +
* Control the '''newepisode''' and '''newmovie''' templates to display a different message when either type of program has been broadcasted/released.

Revision as of 22:35, 26 December 2024

The draft for this template can be found here: Template:Countdown/sandbox This page itself is a draft of the documentation that will eventually be moved over to Template:Countdown.

Planned

Elements of the template found in this section are either in progress or simply hypothetical. They are used to guide the process of creating the template.

Parameters

'end_date'

  • Required?: Yes

The date that the countdown ends. It can be in any date format that the #time parser function supports.

'end_time'

  • Required?: Optional

The time that the countdown ends, on the day defined by 'end date'. It can be in any time format that the #time parser function supports.
If left blank, the template will default to midnight.

'utc_offset'

  • Required?: Optional

The time zone of the 'end_time parameter, defined by the number of hours offset from UTC.
If left blank, the template will default to UTC+0.

'display_style'

  • Required?: Optional

The style of the countdown, which can be either text or a visual clock (created by using a table with invisible borders). If left blank, the template will default to text.

'first_time_unit'

  • Required?: Optional

The first time unit to be displayed on the countdown. For example, putting "hours" will create a countdown where the largest unit of time is hours, not days. If 'first_time_unit' is more precise than 'last_time_unit', the template will not return anything.
If left blank, the template defaults to using days.

'last_time_unit'

  • Required?: Optional

The last time unit to be displayed on the countdown. For example, putting "hours" will create a countdown where the smallest unit of time is hours, not minutes or seconds. If 'last_time_unit' is less precise than 'first_time_unit', the template will not return anything.
If left blank and 'end_time' is also blank, the template defaults to using days. If left blank, but 'end time' is not blank, the template defaults to using seconds.

'when_zero'

  • Required?: Optional

The message to return or action to do when the countdown reaches zero. This can be used either to display a message or pass on an action to another part of a larger template. 'display_style' does not affect this parameter.
The template will not use a default for this parameter when blank.

Variables

(Note: Check to see if variables can be used in this wiki before writing any documentation for this section)

Usages

  • Countdown to episode broadcasts and manga file releases
  • Control the newepisode and newmovie templates to display a different message when either type of program has been broadcasted/released.