Draft: New Countdown Template

The actual draft for the template can be found here: [Template:Countdown/sandbox](/wiki/Template:Countdown/sandbox "Template:Countdown/sandbox")
The test page for the draft template is found here: [Template:Countdown/testcases](/wiki/Template:Countdown/testcases "Template:Countdown/testcases")
This page is a draft of the documentation that will eventually be moved over to [Template:Countdown](/wiki/Template:Countdown "Template:Countdown").
## Contents
* [1 Completed](#Completed)
+ [1.1 Parameters](#Parameters)
- [1.1.1 'end-date'](#.27end-date.27)
- [1.1.2 'end-time'](#.27end-time.27)
- [1.1.3 'utc-offset'](#.27utc-offset.27)
+ [1.2 Sub-templates](#Sub-templates)
- [1.2.1 timeDiff](#timeDiff)
* [2 Planned](#Planned)
+ [2.1 Parameters](#Parameters_2)
- [2.1.1 'display-style'](#.27display-style.27)
- [2.1.2 'first-time-unit'](#.27first-time-unit.27)
- [2.1.3 'last-time-unit'](#.27last-time-unit.27)
- [2.1.4 'when-zero'](#.27when-zero.27)
* [3 Usages](#Usages)
* [4 Contributors](#Contributors)
## Completed[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=1 "Edit section: Completed")]
### Parameters[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=2 "Edit section: Parameters")]
#### 'end-date'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=3 "Edit section: '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'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=4 "Edit section: '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'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=5 "Edit section: '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.
### Sub-templates[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=6 "Edit section: Sub-templates")]
Sub-templates are smaller templates used to help make the entire template more manageable, similar to variables. **Do note:** "Sub-templates," as far as I can tell, is not a standard technical term.
#### [timeDiff](/wiki/Template:TimeDiff "Template:TimeDiff")[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=7 "Edit section: timeDiff")]
Calculates the difference between the current time and a defined time.
## Planned[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=8 "Edit section: 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[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=9 "Edit section: Parameters")]
#### 'display-style'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=10 "Edit section: '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'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=11 "Edit section: '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'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=12 "Edit section: '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 as the last time unit. If left blank, but '**end time'** is not blank, the template defaults to using seconds.
#### 'when-zero'[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=13 "Edit section: '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.
## Usages[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=14 "Edit 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.
## Contributors[[edit](/wiki/index.php?title=Draft:_New_Countdown_Template&action=edit&section=15 "Edit section: Contributors")]
* [Avico](/wiki/User:AvidConanContributor "User:AvidConanContributor") ([talk](/wiki/User_talk:AvidConanContributor "User talk:AvidConanContributor"))