Asof helps keep track of dated statements on the wiki by categorizing it.
Description
It categorizes as follows:
- param 1 is the year
- optional param 2 is the month
- optional param 3 is the day of the month
- optional named parameter alt=[text] is alternative display text (may include wiki markup)
- optional named parameter lc=on gives lower-case-first output displayed text ([A/a]s of [Start date] by default)
- optional named parameter nocat =on removes the category
Installation
Module information
Functions
p.main
Entry point Creates a dated statement and categorizes the page.
Parameters
| Name | Type | purpose |
|---|---|---|
| frame | table | A scribunto frame. |
| Return type | Return purpose |
|---|---|
| string | A string containing "As of", and a category with the date. |
p.isValidDate
Checks if the date is valid.
Parameters
| Name | Type | purpose |
|---|---|---|
| year | string | The required year. |
| month | string | The required month. |
| day | string | The required day. |
| Return type | Return purpose |
|---|---|
| boolean | True if valid year. |
| boolean | True if valid month. |
| boolean | True if valid day. |
Syntax
{{As of|year}}{{As of|year|month}}{{As of|year|month|day}}{{As of|year|month|day|lc=1}}{{As of|year|month|day|alt=alternate text}}
Examples
- {{#invoke:Asof|main|2015}} -> As of 2015
Text above can be found here (edit)