Module:Calendar widget/doc

MyWikiBiz, Author Your Legacy — Sunday December 01, 2024
Jump to navigationJump to search

This is the documentation page for Module:Calendar widget

{{Module rating }}

Usage

{{#invoke:Calendar widget|calendar}}

Parameters

Calendar parameters

  • Template:Para – specifies the year to be used when creating a monthly or yearly calendar; Gregorian calendar only; minimum 1583 for yearly calendar; minimum October 1582 for stand-alone month calendar; when omitted or out of range, uses current year
  • Template:Para – specifies the month to be used when creating an stand-alone month calendar in the year specified by Template:Para; accepts a variety values:
    numbers 1 to 12 – defaults to current month when month number is out of range
    month names (January, March, etc) – defaults to current month when month name is not recognized
    keywords:
    current – display the current month
    last – display the month that occurs before the current month
    next – display the month that occurs after the current month
  • Template:Para – yearly calendars only; number of columns Template:Var to be used for calendar rendering; default is 4; values of Template:Var less than 1 or greater than 12 ignored
  • Template:Para – accepts the single value yes; calendar renders in ISO week format (Monday through Sunday); not needed if Template:Para set
  • Template:Para – accepts the single value yes; calendar renders in ISO week format (Monday through Sunday) with ISO week number in the left column; setting Template:Para automatically sets Template:Para

Styling parameters

Linking parameters

  • Template:Para – various date component linking options:
    d – link days in calendar to calendar day of calendar month – [[December 1]]
    m – link month in calendar header to month article – [[December]] 2019
    y – link year in calendar header to year article – December [[2024]]
    dm – link to days and month
    dy – link to days and year
    my – link to month and year
    yes – individually link all date components
    m&y – stand-alone month calendars only; link month and year together as a single composite link – [[December 2024]]
    dm&y – stand-alone month calendars only; link to days and composite month/year

Link prefixes and suffixes

These parameters require Template:Para:

These parameters automatically set Template:Para to the appropriate value; override values assigned to Template:Para and Template:Para:

For stand-alone month calendars only, links to previous- and next-month targets:

  • Template:Para – accepts the single value yes; adds generic << and >> links to month header linked to the preceding and next month articles; automatically set if any of the following parameters are set:
Examples

if the current page and section is [[An example page#May]] and there is a May calendar there, to offer links to the previous month (April) and next month (June) sections set:

Template:Para – creates link to [[An example page#April]]
Template:Para – creates link to [[An example page#June]]

if the current page is a subpage [[An example page/May]] and there is a May calendar there, to offer links to the previous month and next month subpages set:

Template:Para – creates link to [[An example page/April]]
Template:Para – creates link to [[An example page/June]]
in ../, .. is the parent ([[An example page]]) and / is the required path separator; see Uniform Resource Identifier