Template:Signpost/DateCountdown/doc
Appearance
This is a documentation subpage for Template:Signpost/DateCountdown. It may contain usage information, categories and other content that is not part of the original template page. |
For this:
Deadlines (UTC) Current time is 2024-11-07 04:42:08 ( | )
Utility template for {{Signpost/Deadline}}. Displays a horizontal "progress" bar representing the amount of time remaining in a time span, color-coded (green → yellow → red) to indicate how close it is to the end of the span.
The bar is overlaid with various pieces of information:
- an optional text label
- and, if
|short=
is not enabled:- the proximity to the end date expressed in number of days "left", or "ago" (for past dates)
- the percentage value of the time remaining
Parameters
[edit]|start=YYYY-MM-DD
- The start of the span.
|end=YYYY-MM-DD HH:NN UTC
- The end of the span. (Optional time values default to 00:00 UTC.)
|label=text
- Optional text label to precede the
|end=
date, when labeling the bar. |short=truthy value
- If set, disables the days left/ago labeling and the percentage display.
|width=number or percentage
- Optional CSS width for the bar, defaults to
100%
. Values followed by a percent sign are interpreted as percentages, all others in pixel (px
) units.
Example
[edit]How much remains of the current calendar month:
{{Signpost/DateCountdown |label=End of month:{{sp}} |start={{#time:Y-m"-01"|now}}<!--First day (-01) of current month--> |end={{#time:Y-m-d|{{#time:Y-m"-01"|now}} + 1 month}} |width=80% }}