Template:Weekday in month/ordinal/doc
Template page
More actions
Purpose
This internal helper converts written or suffixed ordinals into the signed numbers used by Template:Weekday in month. Numeric input passes through unchanged.
Usage
Parameter 1 accepts a number, first through fifth, 1st through 5th, last, or the second through fifth-from-last forms. Text matching is case-insensitive. Last occurrences map to negative values from −1 through −5.
Unrecognized nonnumeric text produces an empty value. Use the public wrapper for calendar calculations.