Format:Weekday in month/doc

De la Wikipedia, enciclopedia liberă
Salt la: Navigare, căutare

Utilizare[modificare | modificare sursă]

{{Weekday in month|YEAR|MONTH|N|Q}}

  • YEAR – Anul în format numeric
  • MONTH – Luna în format numeric
  • N – Ziua din săptămână, cu 0 = duminică, 1 = luni, ..., 6 = sâmbătă
  • Q – A N-a zi din săptămână cu 1 = prima, 2 = a doua, 3 = a treia, ..., sau -1 = ultima, -2 = penultima,

Cod[modificare | modificare sursă]

Formula de bază: 7 * Q - 6 + (N - ZiuaDinSăptămână(Year, Month, 1)) % 7

Exemple[modificare | modificare sursă]

Holiday 2006 2007 2008 2009 2010
Day Code Day Code Day Code Day Code Day Code
MLK Jr Day – A 3-a luni din ianuarie Jan 16 16 {{weekday in month|2006|1|1|3}} Jan 15 15 {{weekday in month|2007|1|1|3}} Jan 21 21 {{weekday in month|2008|1|1|3}} Jan 19 19 {{weekday in month|2009|1|1|3}} Jan 18 18 {{weekday in month|2010|1|1|3}}
Presidents Day – A treia luni din februarie Feb 20 20 {{weekday in month|2006|2|1|3}} Feb 19 19 {{weekday in month|2007|2|1|3}} Feb 18 18 {{weekday in month|2008|2|1|3}} Feb 16 16 {{weekday in month|2009|2|1|3}} Feb 15 15 {{weekday in month|2010|2|1|3}}
Memorial Day -- Ultima luni din mai May 29 29 {{weekday in month|2006|5|1|-1}} May 28 28 {{weekday in month|2007|5|1|-1}} May 26 26 {{weekday in month|2008|5|1|-1}} May 25 25 {{weekday in month|2009|5|1|-1}} May 31 31 {{weekday in month|2010|5|1|-1}}
Labor Day – Prima luni din septembrie Sep 4 4 {{weekday in month|2006|9|1|1}} Sep 3 3 {{weekday in month|2007|9|1|1}} Sep 1 1 {{weekday in month|2008|9|1|1}} Sep 7 7 {{weekday in month|2009|9|1|1}} Sep 6 6 {{weekday in month|2010|9|1|1}}
Columbus Day – A doua luni din octombrie Oct 9 9 {{weekday in month|2006|10|1|2}} Oct 8 8 {{weekday in month|2007|10|1|2}} Oct 13 13 {{weekday in month|2008|10|1|2}} Oct 12 12 {{weekday in month|2009|10|1|2}} Oct 11 11 {{weekday in month|2010|10|1|2}}
Thanksgiving – A patra joi din noiembrie Nov 23 23 {{weekday in month|2006|11|4|4}} Nov 22 22 {{weekday in month|2007|11|4|4}} Nov 27 27 {{weekday in month|2008|11|4|4}} Nov 26 26 {{weekday in month|2009|11|4|4}} Nov 25 25 {{weekday in month|2010|11|4|4}}
Father's Day – A treia duminică din iunie Jun 18 18 {{weekday in month|2006|6|0|3}} Jun 17 17 {{weekday in month|2007|6|0|3}} Jun 15 15 {{weekday in month|2008|6|0|3}} Jun 21 21 {{weekday in month|2009|6|0|3}} Jun 20 20 {{weekday in month|2010|6|0|3}}
Mother's Day May 14 14 {{weekday in month|2006|5|0|2}} May 13 13 {{weekday in month|2007|5|0|2}} May 11 11 {{weekday in month|2008|5|0|2}} May 10 10 {{weekday in month|2009|5|0|2}} May 9 9 {{weekday in month|2010|5|0|2}}