Template:Weekday in month/calc/doc
Template page
More actions
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.