Difference between revisions of "Template:Interval"
Jump to navigation
Jump to search
imported>MSGJ (+doc) |
imported>MSGJ m (Protected Template:Interval: Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(No difference)
| |
Revision as of 15:22, 28 October 2010
| This template is used in Template:ACEWatchlistNotice, which is used by MediaWiki:Watchlist-messages when Arbitration Committee elections are taking place. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please discuss any changes on the talk page before implementing them. |
| This template uses Lua: |
Contents
Usage
This template determines which interval a given value lies in.
The intervals are defined by the unnamed parameters. The value to be determined is named parameter n.
format=time can also be passed to the template. If set, the intervals and value will be compared as times (and if n is not provided, it will evaluate as the current timestamp).
Examples
Passing 2, 4 and 6 as the unnamed parameters defines the following intervals:
- -∞<x<2
- 2≤x<4
- 4≤x<6
- 6≤x<∞
Then:
{{Interval|n=1|2|4|6}}gives Template:Interval/core because 1 is in the interval between the 0th and 1st values.{{Interval|n=4|2|4|6}}gives Template:Interval/core because 4 is in the interval between the 2nd and 3rd values.{{Interval|n=5|2|4|6}}gives Template:Interval/core because 5 is in the interval between the 2nd and 3rd values.{{Interval|n=6|2|4|6}}gives Template:Interval/core because 6 is in the interval between the 3rd and 4th values.
Time
{{interval|14 October|24 October|29 October|7 December|format=time}}produces Template:Interval/core
See also
- Template:Intervals, a navbox about musical intervals.
- {{Infobox Interval}}
| The above documentation is transcluded from Template:Interval/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |