Jump to content

Module:Year in various calendars/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 13:43, 28 August 2013 (start section on adding new calendars). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Script error: No such module "Year in other calendars".

2025 in various calendars
Gregorian calendar2025
MMXXV
Ab urbe condita2778
Armenian calendar1474
ԹՎ ՌՆՀԴ
Assyrian calendar6775
Baháʼí calendar181–182
Balinese saka calendar1946–1947
Bengali calendar1431–1432
Berber calendar2975
British Regnal yearCha. 3 – 4 Cha. 3
Buddhist calendar2569
Burmese calendar1387
Byzantine calendar7533–7534
Chinese calendar甲辰年 (Wood Dragon)
4722 or 4515
    — to —
乙巳年 (Wood Snake)
4723 or 4516
Coptic calendar1741–1742
Discordian calendar3191
Ethiopian calendar2017–2018
Hebrew calendar5785–5786
Hindu calendars
 - Vikram Samvat2081–2082
 - Shaka Samvat1946–1947
 - Kali Yuga5125–5126
Holocene calendar12025
Igbo calendar1025–1026
Iranian calendar1403–1404
Islamic calendar1446–1447
Japanese calendarReiwa 7
(令和7年)
Javanese calendar1958–1959
Juche calendar114
Julian calendarGregorian minus 13 days
Korean calendar4358
Minguo calendarROC 114
民國114年
Nanakshahi calendar557
Thai solar calendar2568
Tibetan calendar阳木龙年
(male Wood-Dragon)
2151 or 1770 or 998
    — to —
阴木蛇年
(female Wood-Snake)
2152 or 1771 or 999
Unix time1735689600 – 1767225599

This module produces the sidebar opposite displaying a given Gregorian year in various different calendars.

Syntax

Simple

{{#invoke:Year in various calendars|main}}

All parameters

{{#invoke:Year in various calendars|main |year=(n) |footnotes=(footnotes) |gregcal=(article name)}}

Parameters

year
Number specifying the year to be displayed. This can be negative and also can be in the format "n BC" to display BC dates or "AD n" as an alternative to a positive number. If not specified, the current year is used.
footnotes
Any footnotes to be placed at the bottom of the sidebar.
gregcal
Name of an article to be displayed for Gregorian and Julian years (e.g. "2000 BC"). Do not include square brackets.

Microformat

The HTML mark-up produced by this template includes an hCalendar microformat that makes event/date details readily parsable by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit the Microformat WikiProject.

Classes used

The HTML classes of this microformat include:

  • attendee
  • description
  • dtend
  • dtstart
  • location
  • summary
  • url
  • vevent
Please do not rename or remove these classes
nor collapse nested elements which use them.


Adding new calendars

The module is set up to allow for easy addition of new calendars. Just scroll down to the "Build the box" section of the module code, and add your calendar as follows:

    local myCalendar = calendar:new()
    myCalendar:setLink( 'My calendar article' ) -- the name of the calendar's Wikipedia article
    myCalendar:setYearFunction(
        function( year )
            -- Lua code linking the Gregorian calendar year to your calendar's year.
        end
    )
    box:addCalendar( myCalendar )

If you want to display just one year, then the Lua code should return one number value. If you want to display a year range, then the Lua code should return two number values. More complicated calendars can be displayed as text.