FANDOM


This module 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

Install

Installing modules

To get a brief introduction to lua read the basics page first. On Wikia, one can use modules by either accessing a module remotely or copying all its contents to a Wiki. Modules accessed remotely from dev.wikia are subject to change while 'correctly' copied modules are controlled by a particular wiki.

Using a module "remotely" using Module:Devmodule

Create Module:Devmodule and copy the following code to remotely access modules in dev's repository. See more details in Global Lua Modules/Devmodule.
--[[This imports modules from dev.wikia]]
return require("Dev:Devmodule")

Loading modules remotely from dev.wikia

Create Module:Asof in your wiki and add the following code:
--This loads modules directly from dev.wikia.com
return require("Dev:Asof")

Using Module:Asof in another wiki

To use modules without depending on dev see this page. Create Template:Asof in your wiki and add the following code:
{{#invoke:Asof|main}}

Using template in a page

You can use this module in a page using syntax such as:
{{Asof|main|arg1|arg2}}

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.