ವಿಷಯಕ್ಕೆ ಹೋಗು

ಟೆಂಪ್ಲೇಟು:Weekday in month/doc

ವಿಕಿಪೀಡಿಯದಿಂದ, ಇದು ಮುಕ್ತ ಹಾಗೂ ಸ್ವತಂತ್ರ ವಿಶ್ವಕೋಶ
Code

Note that the order of the input can be reversed. The following give the same output.

{{Weekday in month|y|m|w|n}}
{{Weekday in month|n|w|m|y}}

Note that the year is optional. The following give the nth w-day of month m this year.

{{Weekday in month||m|w|n}}
{{Weekday in month|n|w|m}}
Parameters
y year numeric format, certain words, blank
  • Integers from 1000 to 9999 are accepted.
  • last year and next year are accepted.
  • The year is optional (defaults to the current year).
m month numeric format, spelt out in full or abbreviated
  • For numeric input a leading zero is optional.
  • Three-letter abbreviations are accepted (e.g. Jan, Feb, etc.)
w weekday numeric format, spelt out in full or abbreviated
  • Three-letter abbreviations are accepted (e.g. Sun, Mon, etc.)
  • The weekday numbering follows ISO practice (Sunday → 0, Monday → 1, ... Saturday → 6).
n count numeric format, spelt out in full or abbreviated
  • Positive integers give the nth Sunday/Monday ... Saturday of the month.
  • Negative integers give the nth last Sunday/Monday ... Saturday of the month.
  • Words are accepted (e.g. first, last, etc.)
  • Abbreviations are accepted (e.g. 1st, 2nd, etc.)
Examples
  • for the first Sunday of January 2000
    • n = first, 1st or 1
    • w = Sunday, Sun or 0
    • m = January, Jan or 1
    • y = 2000
  • for the first Monday of February 2006
    • n = first, 1st or 1
    • w = Monday, Mon or 1
    • m = February, Feb or 2
    • y = 2006
  • for the first Tuesday of March 2010
    • n = first, 1st or 1
    • w = Tuesday, Tue or 2
    • m = March, Mar or 3
    • y = 2010
  • for the second Tuesday of April 2012
    • n = second, 2nd or 2
    • w = Tuesday, Tue or 2
    • m = April, Apr or 4
    • y = 2012
  • for the second Tuesday of May 2020
    • n = second, 2nd or 2
    • w = Tuesday, Tue or 2
    • m = May or 5
    • y = 2020
  • for the second Wednesday of June 2100
    • n = second, 2nd or 2
    • w = Wednesday, Wed or 3
    • m = June, Jun or 6
    • y = 2100
  • for the third Wednesday of July this year
    • n = third, 3rd or 3
    • w = Wednesday, Wed or 3
    • m = July, Jul or 7
    • y = {{#time:Y}}, {{CURRENTYEAR}} or leave it blank
  • for the third Thursday of August this year
    • n = third, 3rd or 3
    • w = Thursday, Thu or 4
    • m = August, Aug or 8
    • y = {{#time:Y}}, {{CURRENTYEAR}} or leave it blank
  • for the last Thursday of September last year
    • n = last or -1
    • w = Thursday, Thu or 4
    • m = September, Sep or 9
    • y = {{#time:Y|last year}}, {{LASTYEAR}} or last year
  • for the last Friday of October last year
    • n = last or -1
    • w = Friday, Fri or 5
    • m = October, Oct or 10
    • y = {{#time:Y|last year}}, {{LASTYEAR}} or last year
  • for the second last Friday of November next year
    • n = second last, 2nd last or -2
    • w = Friday, Fri or 5
    • m = November, Nov or 11
    • y = {{#time:Y|next year}}, {{NEXTYEAR}} or next year
  • for the second last Saturday of December next year
    • n = second last, 2nd last or -2
    • w = Saturday, Sat or 6
    • m = December, Dec or 12
    • y = {{#time:Y|next year}}, {{NEXTYEAR}} or next year

The template then gives j, the day of the month, as calculated by the following formulae.

j = 7×n − 6 + (ww1) mod 7 (for positive n)
j = t + 7×(n + 1) − (wtw) mod 7 (for negative n)

Where t is the last day of the month, wt is the ISO weekday number of the last day of the month, w1 is the ISO weekday number of the first day of the month and n and w are as defined above.

year MLK Jr Day (US) Presidents Day (US) Memorial Day (US) Labor Day (US) Columbus Day (US) Father's Day
(Australia)
Mother's Day
(many countries)
Thanksgiving
(Norfolk Island)
Melbourne Cup Day
(Australia)
3rd Monday in January 3rd Monday in February Last Monday in May 1st Monday in September 2nd Monday in October 1st Sunday in September 2nd Sunday in May last Wednesday of November first Tuesday in November
೨೦೧೯ Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೧೯|1|1|3}}
{{weekday in month
|3|1|2|೨೦೧೯}}
{{weekday in month
|೨೦೧೯|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೧೯}}
{{weekday in month
|2nd|Mon|Oct|೨೦೧೯}}
{{weekday in month
|1st|sun|oct|೨೦೧೯}}
{{weekday in month
|2|sun|may|೨೦೧೯}}
{{weekday in month
|last|Wed|Nov|೨೦೧೯}}
{{weekday in month
|1st|Tue|Nov|೨೦೧೯}}
೨೦೨೦ Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೦|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೦}}
{{weekday in month
|೨೦೨೦|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೦}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೦}}
{{weekday in month
|1st|sun|oct|೨೦೨೦}}
{{weekday in month
|2|sun|may|೨೦೨೦}}
{{weekday in month
|last|Wed|Nov|೨೦೨೦}}
{{weekday in month
|1st|Tue|Nov|೨೦೨೦}}
೨೦೨೧ Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೧|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೧}}
{{weekday in month
|೨೦೨೧|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೧}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೧}}
{{weekday in month
|1st|sun|oct|೨೦೨೧}}
{{weekday in month
|2|sun|may|೨೦೨೧}}
{{weekday in month
|last|Wed|Nov|೨೦೨೧}}
{{weekday in month
|1st|Tue|Nov|೨೦೨೧}}
೨೦೨೨ Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೨|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೨}}
{{weekday in month
|೨೦೨೨|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೨}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೨}}
{{weekday in month
|1st|sun|oct|೨೦೨೨}}
{{weekday in month
|2|sun|may|೨೦೨೨}}
{{weekday in month
|last|Wed|Nov|೨೦೨೨}}
{{weekday in month
|1st|Tue|Nov|೨೦೨೨}}
೨೦೨೩
(last year)
Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೩|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೩}}
{{weekday in month
|೨೦೨೩|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೩}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೩}}
{{weekday in month
|1st|sun|oct|೨೦೨೩}}
{{weekday in month
|2|sun|may|೨೦೨೩}}
{{weekday in month
|last|Wed|Nov|೨೦೨೩}}
{{weekday in month
|1st|Tue|Nov|last year}}
೨೦೨೪
(this year)
Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೪|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೪}}
{{weekday in month
|೨೦೨೪|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೪}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೪}}
{{weekday in month
|1st|sun|oct|೨೦೨೪}}
{{weekday in month
|2|sun|may|೨೦೨೪}}
{{weekday in month
|last|Wed|Nov|೨೦೨೪}}
{{weekday in month
|1st|Tue|Nov}}
೨೦೨೫
(next year)
Expression error: Unexpected > operator. January Expression error: Unexpected < operator. February Expression error: Unexpected > operator. May ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೧". October ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". September ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೦". May Expression error: Unexpected < operator. November ಪದವಿನ್ಯಾಸ ದೋಷ: ಗುರುತಿಸಲಾಗದ ವಿರಾಮ ಚಿಹ್ನೆ"೨". November
{{weekday in month
|೨೦೨೫|1|1|3}}
{{weekday in month
|3|1|2|೨೦೨೫}}
{{weekday in month
|೨೦೨೫|5|1|-1}}
{{weekday in month
|first|Monday
|September|೨೦೨೫}}
{{weekday in month
|2nd|Mon|Oct|೨೦೨೫}}
{{weekday in month
|1st|sun|oct|೨೦೨೫}}
{{weekday in month
|2|sun|may|೨೦೨೫}}
{{weekday in month
|last|Wed|Nov|೨೦೨೫}}
{{weekday in month
|1st|Tue|Nov|next year}}