Difference between revisions of "Template:Age switch/doc"
Jump to navigation
Jump to search
blackwiki>Davidwr (+ "returns -1 if "d" is not a valid date) |
blackwiki>Davidwr (;See also: * Is now) |
||
| Line 14: | Line 14: | ||
* The "switch" from 0 to 1 happens only when the page this template is used on is updated or [[WP:PURGE|purged]]. If a page includes a template which calls this template, it is the page the reader sees, not the template which calls this template, which must be purged or updated. | * The "switch" from 0 to 1 happens only when the page this template is used on is updated or [[WP:PURGE|purged]]. If a page includes a template which calls this template, it is the page the reader sees, not the template which calls this template, which must be purged or updated. | ||
| + | ;See also: | ||
| + | * [[Is now]] | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| | ||
<!-- Categories go here and interwikis go in Wikidata. --> | <!-- Categories go here and interwikis go in Wikidata. --> | ||
[[Category:Date-computing templates based on current time|{{PAGENAME}}]] | [[Category:Date-computing templates based on current time|{{PAGENAME}}]] | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 17:19, 1 April 2014
| 40px | This is a documentation subpage for Template:Age switch. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This template is intended to be used by other templates. It returns a "0" if the "age," with respect to "d," has not been reached or a "1" if it has. Returns "-1" if "d" is not a valid date.
It is useful for countdown timers.
- Parameters
|d=is the date the clock "starts" at|age=is the age at which the result will change from 0 to 1. (optional, default is 1 week)
- Limitations
- The "switch" from 0 to 1 happens only when the page this template is used on is updated or purged. If a page includes a template which calls this template, it is the page the reader sees, not the template which calls this template, which must be purged or updated.
- See also