Module:British regnal year/data

From MOASSpedia
Jump to navigation Jump to search

This module implements the {{British regnal year}} template. It converts a year in the Gregorian calendar into a British regnal year.

Syntax

{{#invoke:British regnal year|main|<year in Gregorian calendar>}}

Example

{{British regnal year|1952}} → 16 Geo. 6 – 1 Eliz. 2

Data

The data for the module is stored in a table at Module:British regnal year/data. The module looks through the data list from newest to oldest, and returns the data for the first result where the input year is greater than or equal to the year value. The data table entries are organised as follows:

  • year - the year that the template searches for when deciding what links to display. In most cases this is the year that the monarch's reign began, although it can be different if the history is complicated.
  • linkCurrent - a wikilink to the current monarch's Wikipedia article.
  • startYear - the regnal year of the year value for the current monarch. If this is the monarch's first year on the throne, this is 1; if it is their second year, this is 2, and so on.
  • linkPrev - a wikilink to the Wikipedia article of the previous monarch.
  • prevEndYear - the regnal year of the year value for the previous monarch.
  • note - a short note about the years for this time period. This is displayed after the other content.

See also


-- This is the data for Module:British regnal year. It stores the year that British monarchs
-- ascended to the throne, and the links to their Wikipedia articles.

return {
    {
        year = 1952,
        linkCurrent = '[[Elizabeth II|Eliz.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[George VI|Geo.&nbsp;6]]',
        prevEndYear = 16
    },
    {
        year = 1937,
        linkCurrent = '[[George VI|Geo.&nbsp;6]]',
        startYear = 2,
        linkPrev = '[[George VI|Geo.&nbsp;6]]',
        prevEndYear = 1
    },
    {
        year = 1936,
        linkCurrent = '[[George VI|Geo.&nbsp;6]]',
        startYear = 1,
        linkPrev = '[[George V|Geo.&nbsp;5]]&nbsp;–&nbsp;1&nbsp;[[Edward VIII|Edw.&nbsp;8]]',
        prevEndYear = 26
    },
    {
        year = 1910,
        linkCurrent = '[[George V|Geo.&nbsp;5]]',
        startYear = 1,
        linkPrev = '[[Edward VII|Edw.&nbsp;7]]',
        prevEndYear = 10
    },
    {
        year = 1901,
        linkCurrent = '[[Edward VII|Edw.&nbsp;7]]',
        startYear = 1,
        linkPrev = '[[Queen Victoria|Vict.&nbsp;1]]',
        prevEndYear = 64
    },
    {
        year = 1837,
        linkCurrent = '[[Queen Victoria|Vict.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[William IV of the United Kingdom|Will.&nbsp;4]]',
        prevEndYear = 7
    },
    {
        year = 1830,
        linkCurrent = '[[William IV of the United Kingdom|Will.&nbsp;4]]',
        startYear = 1,
        linkPrev = '[[George IV of the United Kingdom|Geo.&nbsp;4]]',
        prevEndYear = 10
    },
    {
        year = 1820,
        linkCurrent = '[[George IV of the United Kingdom|Geo.&nbsp;4]]',
        startYear = 1,
        linkPrev = '[[George III of the United Kingdom|Geo.&nbsp;3]]',
        prevEndYear = 60
    },
    {
        year = 1760,
        linkCurrent = '[[George III of the United Kingdom|Geo.&nbsp;3]]',
        startYear = 1,
        linkPrev = '[[George II of Great Britain|Geo.&nbsp;2]]',
        prevEndYear = 33
    },
    {
        year = 1727,
        linkCurrent = '[[George II of Great Britain|Geo.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[George I of Great Britain|Geo.&nbsp;1]]',
        prevEndYear = 13
    },
    {
        year = 1714,
        linkCurrent = '[[George I of Great Britain|Geo.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Anne, Queen of Great Britain|Ann.&nbsp;1]]',
        prevEndYear = 12
    },
    {
        year = 1702,
        linkCurrent = '[[Anne, Queen of Great Britain|Ann.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[William III of England|Will.&nbsp;3]]',
        prevEndYear = 14
    },
    {
        year = 1695,
        linkCurrent = '[[William III of England|Will.&nbsp;3]]',
        startYear = 8,
        linkPrev = '[[William III of England|Will.]]&nbsp;&&nbsp;[[Mary II of England|Mar.]]',
        prevEndYear = 7
    },
    {
        year = 1688,
        linkCurrent = '[[William III of England|Will.]]&nbsp;&&nbsp;[[Mary II of England|Mar.]]',
        startYear = 1,
        linkPrev = '[[James II of England|Ja.&nbsp;2]]',
        prevEndYear = 3
    },
    {
        year = 1685,
        linkCurrent = '[[James II of England|Ja.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[Charles II of England|Cha.&nbsp;2]]',
        prevEndYear = 36
    },
    {
        year = 1660,
        linkCurrent = '[[Charles II of England|Cha.&nbsp;2]]',
        startYear = 12,
        linkPrev = '[[Charles II of England|Cha.&nbsp;2]]',
        prevEndYear = 11
    },
    {
        year = 1649,
        linkCurrent = '[[Charles II of England|Cha.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[Charles I of England|Cha.&nbsp;1]]',
        prevEndYear = 24,
        note = "<br />''([[Interregnum (England)|Interregnum]])''"
    },
    {
        year = 1625,
        linkCurrent = '[[Charles I of England|Cha.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[James VI and I|Ja.&nbsp;1]]',
        prevEndYear = 22
    },
    {
        year = 1603,
        linkCurrent = '[[James VI and I|Ja.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Elizabeth I of England|Eliz.&nbsp;1]]',
        prevEndYear = 45
    },
    {
        year = 1558,
        linkCurrent = '[[Elizabeth I of England|Eliz.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Philip II of Spain|Ph.]]&nbsp;&&nbsp;[[Mary I of England|M.]]',
        prevEndYear = 4
    },
    {
        year = 1554,
        linkCurrent = '[[Philip II of Spain|Ph.]]&nbsp;&&nbsp;[[Mary I of England|M.]]',
        startYear = 1,
        linkPrev = '[[Mary I of England|Mar.&nbsp;1]]',
        prevEndYear = 1
    },
    {
        year = 1553,
        linkCurrent = '[[Mary I of England|Mar.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Edward VI of England|Edw.&nbsp;6]]',
        prevEndYear = 6
    },
    {
        year = 1547,
        linkCurrent = '[[Edward VI of England|Edw.&nbsp;6]]',
        startYear = 1,
        linkPrev = '[[Henry VIII of England|Hen.&nbsp;8]]',
        prevEndYear = 38
    },
    {
        year = 1509,
        linkCurrent = '[[Henry VIII of England|Hen.&nbsp;8]]',
        startYear = 1,
        linkPrev = '[[Henry VII of England|Hen.&nbsp;7]]',
        prevEndYear = 24
    },
    {
        year = 1485,
        linkCurrent = '[[Henry VII of England|Hen.&nbsp;7]]',
        startYear = 1,
        linkPrev = '[[Richard III of England|Ric.&nbsp;3]]',
        prevEndYear = 2
    },
    {
        year = 1483,
        linkCurrent = '[[Richard III of England|Ric.&nbsp;3]]',
        startYear = 1,
        linkPrev = '[[Edward IV of England|Edw.&nbsp;4]]',
        prevEndYear = 22
    },
    {
        year = 1461,
        linkCurrent = '[[Edward IV of England|Edw.&nbsp;4]]',
        startYear = 1,
        linkPrev = '[[Henry VI of England|Hen.&nbsp;6]]',
        prevEndYear = 39
    },
    {
        year = 1422,
        linkCurrent = '[[Henry VI of England|Hen.&nbsp;6]]',
        startYear = 1,
        linkPrev = '[[Henry V of England|Hen.&nbsp;5]]',
        prevEndYear = 9
    },
    {
        year = 1413,
        linkCurrent = '[[Henry V of England|Hen.&nbsp;5]]',
        startYear = 1,
        linkPrev = '[[Henry IV of England|Hen.&nbsp;4]]',
        prevEndYear = 14
    },
    {
        year = 1399,
        linkCurrent = '[[Henry IV of England|Hen.&nbsp;4]]',
        startYear = 1,
        linkPrev = '[[Richard II of England|Ric.&nbsp;2]]',
        prevEndYear = 22
    },
    {
        year = 1377,
        linkCurrent = '[[Richard II of England|Ric.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[Edward III of England|Edw.&nbsp;3]]',
        prevEndYear = 50
    },
    {
        year = 1327,
        linkCurrent = '[[Edward III of England|Edw.&nbsp;3]]',
        startYear = 1,
        linkPrev = '[[Edward II of England|Edw.&nbsp;2]]',
        prevEndYear = 20
    },
    {
        year = 1307,
        linkCurrent = '[[Edward II of England|Edw.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[Edward I of England|Edw.&nbsp;1]]',
        prevEndYear = 35
    },
    {
        year = 1272,
        linkCurrent = '[[Edward I of England|Edw.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Henry III of England|Hen.&nbsp;3]]',
        prevEndYear = 56
    },
    {
        year = 1216,
        linkCurrent = '[[Henry III of England|Hen.&nbsp;3]]',
        startYear = 1,
        linkPrev = '[[John, King of England|Joh.&nbsp;1]]',
        prevEndYear = 17
    },
    {
        year = 1199,
        linkCurrent = '[[John, King of England|Joh.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Richard I of England|Ric.&nbsp;1]]',
        prevEndYear = 10
    },
    {
        year = 1189,
        linkCurrent = '[[Richard I of England|Ric.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Henry II of England|Hen.&nbsp;2]]',
        prevEndYear = 35
    },
    {
        year = 1154,
        linkCurrent = '[[Henry II of England|Hen.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[Stephen, King of England|Ste.&nbsp;1]]',
        prevEndYear = 19
    },
    {
        year = 1135,
        linkCurrent = '[[Stephen, King of England|Ste.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[Henry I of England|Hen.&nbsp;1]]',
        prevEndYear = 35
    },
    {
        year = 1100,
        linkCurrent = '[[Henry I of England|Hen.&nbsp;1]]',
        startYear = 1,
        linkPrev = '[[William II of England|Will.&nbsp;2]]',
        prevEndYear = 13
    },
    {
        year = 1087,
        linkCurrent = '[[William II of England|Will.&nbsp;2]]',
        startYear = 1,
        linkPrev = '[[William the Conqueror|Will.&nbsp;1]]',
        prevEndYear = 21
    },
    {
        year = 1066,
        startYear = 1,
        linkCurrent = '[[William the Conqueror|Will.&nbsp;1]]'
    }
}