Difference between revisions of "Template:ISOCALENDAR/doc"
imported>Magioladitis m (clean up, replaced: {{-}} → {{clear}} (4) using AWB (12084)) |
imported>Vanisaac m (→Sub-templates: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
| Line 82: | Line 82: | ||
* [[Template:ISOCALENDAR/day|/day]] | * [[Template:ISOCALENDAR/day|/day]] | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
[[Category:Calendar templates|{{PAGENAME}}]] | [[Category:Calendar templates|{{PAGENAME}}]] | ||
| Line 88: | Line 88: | ||
[[Category:ISO date templates|{{PAGENAME}}]] | [[Category:ISO date templates|{{PAGENAME}}]] | ||
| − | </includeonly> | + | }}</includeonly> |
Latest revision as of 22:37, 25 April 2020
| This is a documentation subpage for Template:ISOCALENDAR. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Parameters
| 1 | title |
|---|---|
| y | calendar year |
| m | calendar month |
| s | width in percent of each column of day (default is 10) |
| cw | week number to highlight |
| cdow | weekday to highlight |
All parameters are optional.
mandcdowmay be fully spelt out, abbreviated or numeric.- The numbering for
cwandcdowis in accordance with ISO 8601 (ISO week date: Monday → 1, Tuesday → 2, ... Sunday → 7)
Output
Title
The calendar title is determined by 1 (the first unnamed parameter), the default is the month and year of the calendar displayed.
Month
The month of the calendar displayed is determined by m.
- If
mis specified, then the year can be specified withy, the default is the current year. - If
mis not specified but1is a valid time the month and/or year is set to match the title, the default is the current month and/or year.
Highlighting
By default the current day is highlighted. To highlight (an)other day(s) use cw and cdow. cw gives the week and cdow the day of the week to be highlighted.
- Together they determine a specific day to be highlighted.
cwalone will highlight the whole week.cdowalone will highlight the given weeek day for the whole month.
Examples
Displaying the current month
To display the current month use {{ISOCALENDAR}}.
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W01 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
| W02 | 05 | 06 | 07 | 08 | 09 | 10 | 11 |
| W03 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| W04 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| W05 | 26 | 27 | 28 | 29 | 30 | 31 | 01 |
Displaying a given month of the current year
A given month of this year can be specified with 1 like this {{ISOCALENDAR|August}}. Alternatively m can be used e.g. {{ISOCALENDAR|m=Sep}}. Perhaps you want a different title e.g. {{ISOCALENDAR|This November|m=11|y=2006}}.
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W31 | 27 | 28 | 29 | 30 | 31 | 01 | 02 |
| W32 | 03 | 04 | 05 | 06 | 07 | 08 | 09 |
| W33 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| W34 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| W35 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| W36 | 31 | 01 | 02 | 03 | 04 | 05 | 06 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W36 | 31 | 01 | 02 | 03 | 04 | 05 | 06 |
| W37 | 07 | 08 | 09 | 10 | 11 | 12 | 13 |
| W38 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| W39 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| W40 | 28 | 29 | 30 | 01 | 02 | 03 | 04 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W44 | 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| W45 | 02 | 03 | 04 | 05 | 06 | 07 | 08 |
| W46 | 09 | 10 | 11 | 12 | 13 | 14 | 15 |
| W47 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| W48 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| W49 | 30 | 01 | 02 | 03 | 04 | 05 | 06 |
Displaying a given month of a given year
A given month and year can be specified with 1 like this {{ISOCALENDAR|May 2006}}. Alternatively m and y can be used e.g. {{ISOCALENDAR|m=June|y=2006}}. Perhaps you want a different title e.g. {{ISOCALENDAR|Quintilis MMVI|m=5|y=2006}}.
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W18 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| W19 | 08 | 09 | 10 | 11 | 12 | 13 | 14 |
| W20 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| W21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| W22 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W22 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
| W23 | 05 | 06 | 07 | 08 | 09 | 10 | 11 |
| W24 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| W25 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| W26 | 26 | 27 | 28 | 29 | 30 | 01 | 02 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W18 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| W19 | 08 | 09 | 10 | 11 | 12 | 13 | 14 |
| W20 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| W21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| W22 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
Highlight a week, a day of the week or a day
You can highlight Saturday of week 3 in January 2021 using {{ISOCALENDAR|January 2021|cw=3|cdow=Sat}}. You can highlight all of week 6 in February 2021 using {{ISOCALENDAR|February 2021|cw=23}} You can highlight all Thursdays of March 2021 using{{ISOCALENDAR|March 2021|cdow=4}}
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W53 | 28 | 29 | 30 | 31 | 01 | 02 | 03 |
| W01 | 04 | 05 | 06 | 07 | 08 | 09 | 10 |
| W02 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| W03 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| W04 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W05 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| W06 | 08 | 09 | 10 | 11 | 12 | 13 | 14 |
| W07 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| W08 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W09 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| W10 | 08 | 09 | 10 | 11 | 12 | 13 | 14 |
| W11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| W12 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| W13 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
Adjusting the width
{{ISOCALENDAR|s=14}} gives
| Week | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| W01 | 29 | 30 | 31 | 01 | 02 | 03 | 04 |
| W02 | 05 | 06 | 07 | 08 | 09 | 10 | 11 |
| W03 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| W04 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| W05 | 26 | 27 | 28 | 29 | 30 | 31 | 01 |
Sub-templates
The main Template:ISOCALENDAR calls