Module:Era/doc

Module implementing the Wikisource-specific categorisation of years into literary "eras": Ancient, Medieval, Renaissance, Early modern, Modern, and Future. Its main user-accessible client is What era is, but the main use is for Author (through Module:Author) and its automatically added categories (the subcategories of Category:Authors by era).

The named eras represent years as follows:

Use
From template code the function is called with  and the year parameter is extracted from the calling frame (the arguments given to the template). See What era is for an example. From a wikipage the year can be provided directly in the invocation:  →.

From a Lua module there is a simplified (and nominally faster) calling convention that avoids the need for having a  object or checking the parent frame. After loading the module you can call its   function with a year as the only parameter:.

However called the return value is always a plain string with no markup or styling.