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.

Template:Weekday in month/calc/doc

Template page

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