You can edit almost every page by Creating an account and confirming your email.

Module:Year

From EverybodyWiki Bios & Wiki

The module “Year” contains 1 available call that extracts the first-mentioned year (assuming it is between 1000 and 9999) from some text.

Usage

{{#invoke:Year|extract|…}}

Parameters

  • The only parameter is the text to extract the year from.

Example

Module talk:Year/testcases


local p = {}
function p.extract(frame)
    s = frame.args[1]
    year = "%d%d%d%d"
    return string.sub(s, string.find(s, year))
end
return p

This module "Year" is from Wikipedia if otherwise notified