This template determines which interval a given value lies in.
| This is a documentation subpage for Template:Interval. It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
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).
Passing 2, 4 and 6 as the unnamed parameters defines the following intervals:
Then:
{{Interval|n=1|2|4|6}} gives 0-1 because 1 is in the interval between the 0th and 1st values.{{Interval|n=4|2|4|6}} gives 2-3 because 4 is in the interval between the 2nd and 3rd values.{{Interval|n=5|2|4|6}} gives 2-3 because 5 is in the interval between the 2nd and 3rd values.{{Interval|n=6|2|4|6}} gives 3-4 because 6 is in the interval between the 3rd and 4th values.{{interval}} produces 4-5
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.