Difference between revisions of "Template:Interval"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(n defaults to current time if format=time)
imported>MSGJ
m (Changed protection level of Template:Interval: unused currently, reducing protection ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
(No difference)

Revision as of 14:57, 26 January 2011

Template:Interval/core

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

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:

Time

See also