FANDOM


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

Module information

Functions

p.main

Entry point Creates a dated statement and categorizes the page.
Parameters
NameTypepurpose
frametableA scribunto frame.
Return typeReturn purpose
stringA string containing "As of", and a category with the date.

p.isValidDate

Checks if the date is valid.
Parameters
NameTypepurpose
yearstringThe required year.
monthstringThe required month.
daystringThe required day.
Return typeReturn purpose
booleanTrue if valid year.
booleanTrue if valid month.
booleanTrue 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
Community content is available under CC-BY-SA unless otherwise noted.