Template:Expiry icon

From MozillaWiki
Jump to: navigation, search

Expression error: Unexpected < operator.

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{expicon}} indicates when an entry expires (task, event, etc.). It does so by displaying one of three different icons, depending on how the current date and time relates to the entered expiry time.

Limitations

This wiki caches its pages. In order to see any changes to entries using this template, you need to refresh the page. You can do so by choosing Refresh in the drop-down menu to the left of the wiki's search bar.

Parameters

There are 6 parameters, all unnamed, of which 3 are required and the remaining 3 are optional.

Syntax

The template's syntax is

  • {{expicon|year (4 digits) |month (2 digits) |day (2 digits) |hours (2 digits) |minutes (2 digits) |size=size value }}

Expiry date

  • The year, month and day of expiration are required.

Expiry time

  • If only the hour of expiration is specified, the template will assume that the expiry time is at the start of that hour, i.e. at HH:00.
  • If no expiry time is entered, the template will assume that the expiry time is at 23:59:59 (one second to midnight) at the specified date.

Required parameters

1

Year

The year of the expiry date.

Notes
  • Must be entered as 4 digits; e.g. 2015, not 15 or '15.
  • Since the template uses Unix time, the input year must conform to the Gregorian calendar.
Usage
  • {{expicon|1|2|3|4|5}}

2

Month

The month of the expiry date.

Notes
  • Must be entered as 2 digits, units padded with a leading zero; e.g. 09, not 9, Sept or September.
  • Since the template uses Unix time, the input month must conform to the Gregorian calendar.
Usage
  • {{expicon|1|2|3|4|5}}

3

Day

The day of the expiry date.

Notes
  • Must be entered as 2 digits, units padded with a leading zero; e.g. 09, not 9, Fri or Friday.
  • Since the template uses Unix time, the input day must conform to the Gregorian calendar.
Usage
  • {{expicon|1|2|3|4|5}}

Optional parameters

4

Hours

The hour of the expiry time in the 24-hours format.

Notes
  • Must be entered as 2 digits, units padded with a leading zero; e.g. 09, not 9.
  • Since the template uses Unix time, the input hour must conform to the 24-hours format; e.g. 19, not 7 or 7pm.
Usage
  • {{expicon|1|2|3|4|5}}

5

Minutes

The minute of the expiry time.

Notes
  • Must be entered as 2 digits, units padded with a leading zero; e.g. 09, not 9.
Usage
  • {{expicon|1|2|3|4|5}}

size

Icon size

It is possible to change the size of the icon. The value can be given in pixels (px) or em-units (em), use the decimal point for fractions.

Notes
  • There can't be any space character between the number value and its unit (px or em).
Usage
  • {{expicon|1|2|3|4|5|size=number value + px/em}}

Examples

Case What you type What you see Comments
Date 2015|01|01}} Expiry-expired.png
2024|11|26}} Expiry-due.png
2115|01|01}} Expiry-notdue.png
Date and hour 2015|01|01|18}} Expiry-expired.png
2024|11|26|14}} Expiry-expired.png
2115|01|01|18}} Expiry-notdue.png
Date and time 2015|01|01|18|35}} Expiry-expired.png
2024|11|26|14|35}} Expiry-expired.png
2115|01|01|18|35}} Expiry-notdue.png
Change size 2015|01|01|18|35|size=20px}} Expiry-expired.png
2024|11|26|14|35|size=20px}} Expiry-expired.png
2115|01|01|18|35|size=20px}} Expiry-notdue.png

See also

  • {{expiry}}: the textual version of this template.
  • {{mark}}: simple highlighting.