Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This subtemplate calculates the day of the month of the nth (or −nth last) w-day in the month m.

Template documentation (for the above template, sometimes hidden or invisible)

Purpose

This internal arithmetic helper calculates the calendar day for the nth occurrence of weekday w in month m. Negative ordinals count backward from the end of the month.

Parameters

Parameter Explanation
n Positive ordinal from the start of the month, or negative ordinal from the end.
w Numeric weekday used by MediaWiki date functions: Sunday is 0 through Saturday at 6.
m Month and year string accepted by MediaWiki's #time parser.

Use Template:Weekday in month for normal calls; it validates and normalizes human-friendly input before invoking this helper.

See also


Visit Template:Weekday in month/calc/doc to edit this text! (How does this work?)