Jump to content

Template talk:Calendar

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 12 years ago by 218.219.62.220 in topic Some bugs
December 2007
  Mo Tu We Th Fr Sa Su
(48) 26 27 28 29 30 1 2
(49) 3 4 5 6 7 8 9
(50) 10 11 12 13 14 15 16
(51) 17 18 19 20 21 22 23
(52) 24 25 26 27 28 29 30
(1) 31 1 2 3 4 5 6


December 2007
  Mo Tu We Th Fr Sa Su
(48) 26 27 28 29 30 1 2
(49) 3 4 5 6 7 8 9
(50) 10 11 12 13 14 15 16
(51) 17 18 19 20 21 22 23
(52) 24 25 26 27 28 29 30
(1) 31 1 2 3 4 5 6

Some bugs

[edit]

Day s= bug

[edit]

If you add the day parameter s, the calendar extends to both margins (in FireFox):

2009-12
  Mo Tu We Th Fr Sa Su
(49) 30 1 2 3 4 5 6
(50) 7 8 9 10 11 12 13
(51) 14 15 16 17 18 19 20
(52) 21 22 23 24 25 26 27
(53) 28 29 30 31 1 2 3


2010-01
  Mo Tu We Th Fr Sa Su
(53) 28 29 30 31 1 2 3
(1) 4 5 6 7 8 9 10
(2) 11 12 13 14 15 16 17
(3) 18 19 20 21 22 23 24
(4) 25 26 27 28 29 30 31


This is not a bug. In fact you misunderstand the meaning of the parameter s. It can be used to control the width (in percent) of each column of day. --Quest for Truth 23:08, 21 January 2011 (UTC)Reply

6 weeks are returned even the month only contains 5 weeks

[edit]

6 weeks are returned even the month only contains 5 weeks

February can contaion only four (4) weeks

[edit]

February can contaion only four (4) weeks

Highlighting the right day of the right week of the wrong year

[edit]

A specfic day can be highlighted using parameters cw and cdow. If not specified, the default is to highlight the current day of the week in the current week ... today ... right? This makes sense if it is today but note that if the year is not this year it won't be today. Here are calendars for last year, this year and next year. Note how today is highlighted along with the day last year which had the same week and day number and similarly for next year.

2023
Last year
2024
This year
2025
Next Year
Jan
  Mo Tu We Th Fr Sa Su
(52) 26 27 28 29 30 31 1
(1) 2 3 4 5 6 7 8
(2) 9 10 11 12 13 14 15
(3) 16 17 18 19 20 21 22
(4) 23 24 25 26 27 28 29
(5) 30 31 1 2 3 4 5


Feb
  Mo Tu We Th Fr Sa Su
(5) 30 31 1 2 3 4 5
(6) 6 7 8 9 10 11 12
(7) 13 14 15 16 17 18 19
(8) 20 21 22 23 24 25 26
(9) 27 28 1 2 3 4 5


Mar
  Mo Tu We Th Fr Sa Su
(9) 27 28 1 2 3 4 5
(10) 6 7 8 9 10 11 12
(11) 13 14 15 16 17 18 19
(12) 20 21 22 23 24 25 26
(13) 27 28 29 30 31 1 2


Apr
  Mo Tu We Th Fr Sa Su
(13) 27 28 29 30 31 1 2
(14) 3 4 5 6 7 8 9
(15) 10 11 12 13 14 15 16
(16) 17 18 19 20 21 22 23
(17) 24 25 26 27 28 29 30


May
  Mo Tu We Th Fr Sa Su
(18) 1 2 3 4 5 6 7
(19) 8 9 10 11 12 13 14
(20) 15 16 17 18 19 20 21
(21) 22 23 24 25 26 27 28
(22) 29 30 31 1 2 3 4


Jun
  Mo Tu We Th Fr Sa Su
(22) 29 30 31 1 2 3 4
(23) 5 6 7 8 9 10 11
(24) 12 13 14 15 16 17 18
(25) 19 20 21 22 23 24 25
(26) 26 27 28 29 30 1 2


Jul
  Mo Tu We Th Fr Sa Su
(26) 26 27 28 29 30 1 2
(27) 3 4 5 6 7 8 9
(28) 10 11 12 13 14 15 16
(29) 17 18 19 20 21 22 23
(30) 24 25 26 27 28 29 30
(31) 31 1 2 3 4 5 6


Aug
  Mo Tu We Th Fr Sa Su
(31) 31 1 2 3 4 5 6
(32) 7 8 9 10 11 12 13
(33) 14 15 16 17 18 19 20
(34) 21 22 23 24 25 26 27
(35) 28 29 30 31 1 2 3


Sep
  Mo Tu We Th Fr Sa Su
(35) 28 29 30 31 1 2 3
(36) 4 5 6 7 8 9 10
(37) 11 12 13 14 15 16 17
(38) 18 19 20 21 22 23 24
(39) 25 26 27 28 29 30 1


Oct
  Mo Tu We Th Fr Sa Su
(39) 25 26 27 28 29 30 1
(40) 2 3 4 5 6 7 8
(41) 9 10 11 12 13 14 15
(42) 16 17 18 19 20 21 22
(43) 23 24 25 26 27 28 29
(44) 30 31 1 2 3 4 5


Nov
  Mo Tu We Th Fr Sa Su
(44) 30 31 1 2 3 4 5
(45) 6 7 8 9 10 11 12
(46) 13 14 15 16 17 18 19
(47) 20 21 22 23 24 25 26
(48) 27 28 29 30 1 2 3


Dec
  Mo Tu We Th Fr Sa Su
(48) 27 28 29 30 1 2 3
(49) 4 5 6 7 8 9 10
(50) 11 12 13 14 15 16 17
(51) 18 19 20 21 22 23 24
(52) 25 26 27 28 29 30 31
(1) 1 2 3 4 5 6 7
Jan
  Mo Tu We Th Fr Sa Su
(1) 1 2 3 4 5 6 7
(2) 8 9 10 11 12 13 14
(3) 15 16 17 18 19 20 21
(4) 22 23 24 25 26 27 28
(5) 29 30 31 1 2 3 4


Feb
  Mo Tu We Th Fr Sa Su
(5) 29 30 31 1 2 3 4
(6) 5 6 7 8 9 10 11
(7) 12 13 14 15 16 17 18
(8) 19 20 21 22 23 24 25
(9) 26 27 28 29 1 2 3


Mar
  Mo Tu We Th Fr Sa Su
(9) 26 27 28 29 1 2 3
(10) 4 5 6 7 8 9 10
(11) 11 12 13 14 15 16 17
(12) 18 19 20 21 22 23 24
(13) 25 26 27 28 29 30 31


Apr
  Mo Tu We Th Fr Sa Su
(14) 1 2 3 4 5 6 7
(15) 8 9 10 11 12 13 14
(16) 15 16 17 18 19 20 21
(17) 22 23 24 25 26 27 28
(18) 29 30 1 2 3 4 5


May
  Mo Tu We Th Fr Sa Su
(18) 29 30 1 2 3 4 5
(19) 6 7 8 9 10 11 12
(20) 13 14 15 16 17 18 19
(21) 20 21 22 23 24 25 26
(22) 27 28 29 30 31 1 2


Jun
  Mo Tu We Th Fr Sa Su
(22) 27 28 29 30 31 1 2
(23) 3 4 5 6 7 8 9
(24) 10 11 12 13 14 15 16
(25) 17 18 19 20 21 22 23
(26) 24 25 26 27 28 29 30


Jul
  Mo Tu We Th Fr Sa Su
(27) 1 2 3 4 5 6 7
(28) 8 9 10 11 12 13 14
(29) 15 16 17 18 19 20 21
(30) 22 23 24 25 26 27 28
(31) 29 30 31 1 2 3 4


Aug
  Mo Tu We Th Fr Sa Su
(31) 29 30 31 1 2 3 4
(32) 5 6 7 8 9 10 11
(33) 12 13 14 15 16 17 18
(34) 19 20 21 22 23 24 25
(35) 26 27 28 29 30 31 1


Sep
  Mo Tu We Th Fr Sa Su
(35) 26 27 28 29 30 31 1
(36) 2 3 4 5 6 7 8
(37) 9 10 11 12 13 14 15
(38) 16 17 18 19 20 21 22
(39) 23 24 25 26 27 28 29
(40) 30 1 2 3 4 5 6


Oct
  Mo Tu We Th Fr Sa Su
(40) 30 1 2 3 4 5 6
(41) 7 8 9 10 11 12 13
(42) 14 15 16 17 18 19 20
(43) 21 22 23 24 25 26 27
(44) 28 29 30 31 1 2 3


Nov
  Mo Tu We Th Fr Sa Su
(44) 28 29 30 31 1 2 3
(45) 4 5 6 7 8 9 10
(46) 11 12 13 14 15 16 17
(47) 18 19 20 21 22 23 24
(48) 25 26 27 28 29 30 1


Dec
  Mo Tu We Th Fr Sa Su
(48) 25 26 27 28 29 30 1
(49) 2 3 4 5 6 7 8
(50) 9 10 11 12 13 14 15
(51) 16 17 18 19 20 21 22
(52) 23 24 25 26 27 28 29
(1) 30 31 1 2 3 4 5
Jan
  Mo Tu We Th Fr Sa Su
(1) 30 31 1 2 3 4 5
(2) 6 7 8 9 10 11 12
(3) 13 14 15 16 17 18 19
(4) 20 21 22 23 24 25 26
(5) 27 28 29 30 31 1 2


Feb
  Mo Tu We Th Fr Sa Su
(5) 27 28 29 30 31 1 2
(6) 3 4 5 6 7 8 9
(7) 10 11 12 13 14 15 16
(8) 17 18 19 20 21 22 23
(9) 24 25 26 27 28 1 2


Mar
  Mo Tu We Th Fr Sa Su
(9) 24 25 26 27 28 1 2
(10) 3 4 5 6 7 8 9
(11) 10 11 12 13 14 15 16
(12) 17 18 19 20 21 22 23
(13) 24 25 26 27 28 29 30
(14) 31 1 2 3 4 5 6


Apr
  Mo Tu We Th Fr Sa Su
(14) 31 1 2 3 4 5 6
(15) 7 8 9 10 11 12 13
(16) 14 15 16 17 18 19 20
(17) 21 22 23 24 25 26 27
(18) 28 29 30 1 2 3 4


May
  Mo Tu We Th Fr Sa Su
(18) 28 29 30 1 2 3 4
(19) 5 6 7 8 9 10 11
(20) 12 13 14 15 16 17 18
(21) 19 20 21 22 23 24 25
(22) 26 27 28 29 30 31 1


Jun
  Mo Tu We Th Fr Sa Su
(22) 26 27 28 29 30 31 1
(23) 2 3 4 5 6 7 8
(24) 9 10 11 12 13 14 15
(25) 16 17 18 19 20 21 22
(26) 23 24 25 26 27 28 29
(27) 30 1 2 3 4 5 6


Jul
  Mo Tu We Th Fr Sa Su
(27) 30 1 2 3 4 5 6
(28) 7 8 9 10 11 12 13
(29) 14 15 16 17 18 19 20
(30) 21 22 23 24 25 26 27
(31) 28 29 30 31 1 2 3


Aug
  Mo Tu We Th Fr Sa Su
(31) 28 29 30 31 1 2 3
(32) 4 5 6 7 8 9 10
(33) 11 12 13 14 15 16 17
(34) 18 19 20 21 22 23 24
(35) 25 26 27 28 29 30 31


Sep
  Mo Tu We Th Fr Sa Su
(36) 1 2 3 4 5 6 7
(37) 8 9 10 11 12 13 14
(38) 15 16 17 18 19 20 21
(39) 22 23 24 25 26 27 28
(40) 29 30 1 2 3 4 5


Oct
  Mo Tu We Th Fr Sa Su
(40) 29 30 1 2 3 4 5
(41) 6 7 8 9 10 11 12
(42) 13 14 15 16 17 18 19
(43) 20 21 22 23 24 25 26
(44) 27 28 29 30 31 1 2


Nov
  Mo Tu We Th Fr Sa Su
(44) 27 28 29 30 31 1 2
(45) 3 4 5 6 7 8 9
(46) 10 11 12 13 14 15 16
(47) 17 18 19 20 21 22 23
(48) 24 25 26 27 28 29 30


Dec
  Mo Tu We Th Fr Sa Su
(49) 1 2 3 4 5 6 7
(50) 8 9 10 11 12 13 14
(51) 15 16 17 18 19 20 21
(52) 22 23 24 25 26 27 28
(1) 29 30 31 1 2 3 4

Jimp (talk) 01:21, 31 May 2012 (UTC)Reply


A related problem occurs where only one of cw or cdow is specified. If you specify only the week (cw) to highlight, you get the current day of the week highlighted in that week (regardless of whether that is the current week or year). If you specify only the day, that day is highlighted in the week that matches the current week's week number (regardless of whether it's the right year).

I think it would make more sense if if only the week is specified, the whole week is highlighted, and if only the day of the week is specfied, each of them should be highlighted (e.g.all the Thursdays).

Actually I've solved this problem. Solution is at en.Wikipedia. 218.219.62.220 05:52, 1 June 2012 (UTC)Reply


Dec
  Mo Tu We Th Fr Sa Su
(48) 27 28 29 30 1 2 3
(49) 4 5 6 7 8 9 10
(50) 11 12 13 14 15 16 17
(51) 18 19 20 21 22 23 24
(52) 25 26 27 28 29 30 31
(1) 1 2 3 4 5 6 7


{{{1}}}
  Mo Tu We Th Fr Sa Su
(22) 29 30 31 1 2 3 4
(23) 5 6 7 8 9 10 11
(24) 12 13 14 15 16 17 18
(25) 19 20 21 22 23 24 25
(26) 26 27 28 29 30 1 2


Solved bugs

[edit]

Wrong week number next year: Ex. ISO year tree days into next gregorian year

Wrong week number prior year: Ex. ISO year tree days into prior gregorian year


Nsaa 00:11, 23 November 2006 (UTC)Reply