Changes
Jump to navigation
Jump to search
m
Reverted edits by 73.96.113.33 (talk) to last version by Ранко Николић
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
This template displays either a yearly or monthly calendar (from 1970-2037).
==Parameters==
;month
:To display a single month the parameter <code>month</code> must be defined. This parameter can be a month name or number, the current month use <code>month=current</code> (<code>next</code> and <code>last</code> are also accepted).
;year
:The parameter <code>year</code> sets the year of the calendar the default being the current year.
;format
:To start the week on Monday use either <code>format=Mon1st</code> or, to include [[ISO week date|ISO week numbers]], <code>format=iso</code>. The keywords are case-sensitive.
{{calendar|lk=on|show_year=on|float=right|month=current|format=iso}}
;show_year
:To display the year use <code>show_year=on</code>. To show the year after the month use <code>show_year=with month</code>.
;txt_pref_m
:This adds a prefix to the month name.
;txt_suff_m
:This adds a suffix to the month name.
;float
:To float the calendar left or right use <code>float=left</code> or <code>float=right</code>.
;lk
:To link days, months and years use <code>lk=on</code>.
:To link days and months use <code>lk=dm</code>.
:To link months and years use <code>lk=my</code>.
:To link days and years use <code>lk=dy</code>.
:To link days only use <code>lk=d</code>.
:To link months only use <code>lk=m</code>.
:To link years only use <code>lk=y</code>.
;lk_pref
:This adds a prefix to all links.
;lk_pref_d
:This adds a prefix to day links.
;lk_pref_m
:This adds a prefix to month links.
;lk_pref_mnext
:This adds a prefix to the next month's link.
;lk_pref_mprev
:This adds a prefix to the previous month's link.
;lk_suff
:This adds a suffix to all links.
;lk_suff_d
:This adds a suffix to day links.
;lk_suff_m
:This adds a suffix to month links.
;lk_suff_mnext
:This adds a suffix to the next month's link.
;lk_suff_mprev
:This adds a suffix to the previous month's link.
;prevnext
:To add links to the previous and next months use <code>prevnext=on</code>.
;title_colour
:Use this to change the background colour of the title bar with name of the month, and the bottom bar (e.g. <code>title_colour=#2e8b57</code>).
;week_colour
:Use this to change the colour of the bar listing the days of the week (e.g. <code>week_colour=#2e8b57</code>).
;colour
:This is shorthand for both of the above.
;wknum_colour
:Use this to change the background colour of the ISO week numbers, when using <code>format=iso</code> (e.g. <code>wknum_colour=#2e8b57</code>).
;wk5253
:Use <code>wk5253=on</code> to start the year with week 52/53, when using <code>format=iso</code> with a year calendar. The only use case for this, is when the year is unknown and it starts with a Saturday. See [[Common year starting on Saturday]] as an example.
;EndNote
:This adds text to the bottom bar.
{{TemplateDataHeader}}
<templatedata>{
"description": "Display a year or month calendar",
"params": {
"year": {
"label": "Year",
"description": "the ordinal year number of the calendar",
"suggested": true,
"default": "current",
"type": "number"
},
"month": {
"label": "Month",
"description": "whether to display a single month instead of a whole year, and which one",
"example": "current, next, last, 1, January",
"default": "empty",
"suggested": true,
"type": "string"
},
"show_year": {
"label": "Show year",
"description": "whether to display the year number, and where",
"example": "with month, off",
"default": "on",
"type": "boolean"
},
"title": {
"label": "Title text",
"description": "text in the top bar",
"type": "content"
},
"EndNote": {
"label": "End note",
"description": "text in the bottom bar",
"type": "content"
},
"format": {
"label": "Week format",
"description": "The string to be trimmed and counted",
"example": "iso, Mon1st",
"default": "Sun1st",
"type": "string"
},
"col": {
"label": "Months per row",
"description": "Display this many months per row (1, 3, 4 or 6 rows)",
"example": "2, 3, 12",
"default": "4",
"type": "number"
},
"row": {
"label": "Months per column",
"description": "Display this many months per column (3 or 4 cols). If set, overrides ‘col’ parameter.",
"example": "3, 4",
"default": "empty",
"type": "number"
},
"float": {
"label": "Float side",
"description": "Horizontally align the calendar",
"example": "right, left",
"default": "none",
"required": false,
"type": "string"
},
"prevnext": {
"label": "Serial navigation",
"description": "Add links to the previous and next months",
"example": "on",
"type": "boolean"
},
"colour": {
"label": "Background color",
"description": "Default for Title and Week background",
"example": "#2E8B57",
"type": "string"
},
"title_colour": {
"label": "Title background",
"description": "change the background colour of the title bar with name of the month, and the bottom bar",
"inherits": "colour"
},
"week_colour": {
"label": "Week background",
"description": "change the colour of the bar listing the days of the week",
"inherits": "colour"
},
"wknum_colour": {
"label": "ISO week numbers background",
"description": "change the colour of the bar listing the ISO week numbers",
"inherits": "colour"
},
"wk5253": {
"label": "Fixed starting week workaround",
"description": "start the year with week 52/53, when the first day is a Saturday.",
"required": false,
"type": "boolean"
},
"txt_pref_m": {
"label": "Month name prefix",
"description": "Text to add before month names",
"required": false,
"type": "line"
},
"txt_suff_m": {
"label": "Month name suffix",
"description": "Text to add after month names",
"inherits": "txt_pref_m"
},
"lk": {
"label": "Link",
"description": "whether to automatically link days (d), months (m) and years (y)",
"example": "on = dmy, dm, my, dy, d, m, y",
"default": "off",
"required": false,
"type": "string"
},
"lk_pref": {
"label": "Link prefix",
"description": "Text to add before all links",
"inherits": "txt_pref_m"
},
"lk_suff": {
"label": "Link suffix",
"description": "Text to add after all links",
"inherits": "txt_pref_m"
},
"lk_pref_d": {
"label": "Day link prefix",
"description": "Text to add before links to days",
"inherits": "txt_pref_m"
},
"lk_suff_d": {
"label": "Day link suffix",
"description": "Text to add after links to days",
"inherits": "txt_pref_m"
},
"lk_pref_m": {
"label": "Month link prefix",
"description": "Text to add before links to months",
"inherits": "txt_pref_m"
},
"lk_suff_m": {
"label": "Month link suffix",
"description": "Text to add after links to months",
"inherits": "txt_pref_m"
},
"lk_pref_mnext": {
"label": "Next link prefix",
"description": "Text to add before the link to the next month (or year)",
"inherits": "txt_pref_m"
},
"lk_suff_mnext": {
"label": "Next link suffix",
"description": "Text to add after the link to the next month (or year)",
"inherits": "txt_pref_m"
},
"lk_pref_mprev": {
"label": "Previous link prefix",
"description": "Text to add before the link to the previous month (or year)",
"inherits": "txt_pref_m"
},
"lk_suff_mprev": {
"label": "Previous link suffix",
"description": "Text to add after the link to the next month (or year)",
"inherits": "txt_pref_m"
}
}}</templatedata>
==Examples==
<code><nowiki>{{calendar|lk=on|show_year=on|float=right|month=current}}</nowiki></code> produces the calendar above. The calendars below are produced by <code><nowiki>{{calendar}}</nowiki></code> and <code><nowiki>{{calendar|prevnext=true|format=iso|zero=0|row=3}}</nowiki></code>, respectively.
{{calendar}}
{{calendar|prevnext=true|format=iso|zero=0|row=3}}
==See also==
{{Calendar, clock, date and time computing templates}}
<includeonly>
<!-- Categories and interwikis go here: -->
[[Category:Calendar templates|{{PAGENAME}}]]
[[Category:Broken templates]]
</includeonly>
<!-- Categories and interwikis go at the bottom of this page. -->
This template displays either a yearly or monthly calendar (from 1970-2037).
==Parameters==
;month
:To display a single month the parameter <code>month</code> must be defined. This parameter can be a month name or number, the current month use <code>month=current</code> (<code>next</code> and <code>last</code> are also accepted).
;year
:The parameter <code>year</code> sets the year of the calendar the default being the current year.
;format
:To start the week on Monday use either <code>format=Mon1st</code> or, to include [[ISO week date|ISO week numbers]], <code>format=iso</code>. The keywords are case-sensitive.
{{calendar|lk=on|show_year=on|float=right|month=current|format=iso}}
;show_year
:To display the year use <code>show_year=on</code>. To show the year after the month use <code>show_year=with month</code>.
;txt_pref_m
:This adds a prefix to the month name.
;txt_suff_m
:This adds a suffix to the month name.
;float
:To float the calendar left or right use <code>float=left</code> or <code>float=right</code>.
;lk
:To link days, months and years use <code>lk=on</code>.
:To link days and months use <code>lk=dm</code>.
:To link months and years use <code>lk=my</code>.
:To link days and years use <code>lk=dy</code>.
:To link days only use <code>lk=d</code>.
:To link months only use <code>lk=m</code>.
:To link years only use <code>lk=y</code>.
;lk_pref
:This adds a prefix to all links.
;lk_pref_d
:This adds a prefix to day links.
;lk_pref_m
:This adds a prefix to month links.
;lk_pref_mnext
:This adds a prefix to the next month's link.
;lk_pref_mprev
:This adds a prefix to the previous month's link.
;lk_suff
:This adds a suffix to all links.
;lk_suff_d
:This adds a suffix to day links.
;lk_suff_m
:This adds a suffix to month links.
;lk_suff_mnext
:This adds a suffix to the next month's link.
;lk_suff_mprev
:This adds a suffix to the previous month's link.
;prevnext
:To add links to the previous and next months use <code>prevnext=on</code>.
;title_colour
:Use this to change the background colour of the title bar with name of the month, and the bottom bar (e.g. <code>title_colour=#2e8b57</code>).
;week_colour
:Use this to change the colour of the bar listing the days of the week (e.g. <code>week_colour=#2e8b57</code>).
;colour
:This is shorthand for both of the above.
;wknum_colour
:Use this to change the background colour of the ISO week numbers, when using <code>format=iso</code> (e.g. <code>wknum_colour=#2e8b57</code>).
;wk5253
:Use <code>wk5253=on</code> to start the year with week 52/53, when using <code>format=iso</code> with a year calendar. The only use case for this, is when the year is unknown and it starts with a Saturday. See [[Common year starting on Saturday]] as an example.
;EndNote
:This adds text to the bottom bar.
{{TemplateDataHeader}}
<templatedata>{
"description": "Display a year or month calendar",
"params": {
"year": {
"label": "Year",
"description": "the ordinal year number of the calendar",
"suggested": true,
"default": "current",
"type": "number"
},
"month": {
"label": "Month",
"description": "whether to display a single month instead of a whole year, and which one",
"example": "current, next, last, 1, January",
"default": "empty",
"suggested": true,
"type": "string"
},
"show_year": {
"label": "Show year",
"description": "whether to display the year number, and where",
"example": "with month, off",
"default": "on",
"type": "boolean"
},
"title": {
"label": "Title text",
"description": "text in the top bar",
"type": "content"
},
"EndNote": {
"label": "End note",
"description": "text in the bottom bar",
"type": "content"
},
"format": {
"label": "Week format",
"description": "The string to be trimmed and counted",
"example": "iso, Mon1st",
"default": "Sun1st",
"type": "string"
},
"col": {
"label": "Months per row",
"description": "Display this many months per row (1, 3, 4 or 6 rows)",
"example": "2, 3, 12",
"default": "4",
"type": "number"
},
"row": {
"label": "Months per column",
"description": "Display this many months per column (3 or 4 cols). If set, overrides ‘col’ parameter.",
"example": "3, 4",
"default": "empty",
"type": "number"
},
"float": {
"label": "Float side",
"description": "Horizontally align the calendar",
"example": "right, left",
"default": "none",
"required": false,
"type": "string"
},
"prevnext": {
"label": "Serial navigation",
"description": "Add links to the previous and next months",
"example": "on",
"type": "boolean"
},
"colour": {
"label": "Background color",
"description": "Default for Title and Week background",
"example": "#2E8B57",
"type": "string"
},
"title_colour": {
"label": "Title background",
"description": "change the background colour of the title bar with name of the month, and the bottom bar",
"inherits": "colour"
},
"week_colour": {
"label": "Week background",
"description": "change the colour of the bar listing the days of the week",
"inherits": "colour"
},
"wknum_colour": {
"label": "ISO week numbers background",
"description": "change the colour of the bar listing the ISO week numbers",
"inherits": "colour"
},
"wk5253": {
"label": "Fixed starting week workaround",
"description": "start the year with week 52/53, when the first day is a Saturday.",
"required": false,
"type": "boolean"
},
"txt_pref_m": {
"label": "Month name prefix",
"description": "Text to add before month names",
"required": false,
"type": "line"
},
"txt_suff_m": {
"label": "Month name suffix",
"description": "Text to add after month names",
"inherits": "txt_pref_m"
},
"lk": {
"label": "Link",
"description": "whether to automatically link days (d), months (m) and years (y)",
"example": "on = dmy, dm, my, dy, d, m, y",
"default": "off",
"required": false,
"type": "string"
},
"lk_pref": {
"label": "Link prefix",
"description": "Text to add before all links",
"inherits": "txt_pref_m"
},
"lk_suff": {
"label": "Link suffix",
"description": "Text to add after all links",
"inherits": "txt_pref_m"
},
"lk_pref_d": {
"label": "Day link prefix",
"description": "Text to add before links to days",
"inherits": "txt_pref_m"
},
"lk_suff_d": {
"label": "Day link suffix",
"description": "Text to add after links to days",
"inherits": "txt_pref_m"
},
"lk_pref_m": {
"label": "Month link prefix",
"description": "Text to add before links to months",
"inherits": "txt_pref_m"
},
"lk_suff_m": {
"label": "Month link suffix",
"description": "Text to add after links to months",
"inherits": "txt_pref_m"
},
"lk_pref_mnext": {
"label": "Next link prefix",
"description": "Text to add before the link to the next month (or year)",
"inherits": "txt_pref_m"
},
"lk_suff_mnext": {
"label": "Next link suffix",
"description": "Text to add after the link to the next month (or year)",
"inherits": "txt_pref_m"
},
"lk_pref_mprev": {
"label": "Previous link prefix",
"description": "Text to add before the link to the previous month (or year)",
"inherits": "txt_pref_m"
},
"lk_suff_mprev": {
"label": "Previous link suffix",
"description": "Text to add after the link to the next month (or year)",
"inherits": "txt_pref_m"
}
}}</templatedata>
==Examples==
<code><nowiki>{{calendar|lk=on|show_year=on|float=right|month=current}}</nowiki></code> produces the calendar above. The calendars below are produced by <code><nowiki>{{calendar}}</nowiki></code> and <code><nowiki>{{calendar|prevnext=true|format=iso|zero=0|row=3}}</nowiki></code>, respectively.
{{calendar}}
{{calendar|prevnext=true|format=iso|zero=0|row=3}}
==See also==
{{Calendar, clock, date and time computing templates}}
<includeonly>
<!-- Categories and interwikis go here: -->
[[Category:Calendar templates|{{PAGENAME}}]]
[[Category:Broken templates]]
</includeonly>