Template:Weekday in month/calc

From Sapphire Wiki

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