Usage edit

An asterisk "*" marks non-specified parameters, and which in this case are taken equal to their current values.

  • {{DatesWD|1}} gives first Saturday* in May* of 2024* — 2024-05-04
  • {{DatesWD|2|4}} gives second Thursday in May* of 2024* — 2024-05-09
  • {{DatesWD|-1|0|12|date=wiki}} gives last Sunday in December of 2024* in a short wiki link format — December 29
  • {{DatesWD|4|3|9|2011|format=%a %d %b %Y}} gives fourth Wednesday in September of 2011 in some #Lua date format — Wed 28 Sep 2011
  • {{DatesWD|1|2|3|date=1}} gives first Tuesday of March in next year — March 04, 2025
  • {{DatesWD|3|5|2|date=-1}} gives third Friday of February in last year — February 17, 2023
  • {{DatesWD|-2|6|7|{{#expr:{{CURRENTYEAR}}-1}}|date=wiki_long}} gives penultimate Saturday in July for last year in a long wiki link format — June 17, 2023

Lua date format edit

If you use the |date= parameter, then this format does not work.

  • %a abbreviated weekday name (e.g., Wed)
  • %A full weekday name (e.g., Wednesday)
  • %b abbreviated month name (e.g., Sep)
  • %B full month name (e.g., September)
  • %x date (e.g., 09/16/98)
  • %d day of the month (16) [01-31]
  • %m month (09) [01-12]
  • %w weekday (3) [0-6 = Sunday-Saturday]
  • %Y full year (1998)
  • %y two-digit year (98) [00-99]

Template Data edit

Calculation of non-fixed dates on the nth day of the week in a given month (and a year).

Template parameters

ParameterDescriptionTypeStatus
Nth1

1 = first, 2 = second, etc. -1 = last, -2 = penultimate, etc

Default
default value
Numberrequired
Day of the week2

0 = Sunday, 1 = Monday, ... 6 = Saturday

Default
current
Numbersuggested
Month3

1 = January, 2 = February, ... 12 = December

Default
current
Numbersuggested
Year4

Fore digits year

Default
current
Numberoptional
Wiki date output formatsdate

MD/wiki for [[January 1]] format, MDY/wiki_long for [[December 31, 2018]] format

Lineoptional
Lua output formatformat

%x for date format MM/DD/YY or others, default YYYY-MM-DD

Default
%Y-%m-%d
Lineoptional