Template:NthDayOfMonth

From Hackerspace ACKspace
Jump to: navigation, search

See if we can create a template where we can show the n-th day of the month, like the first sunday or second to last saturday (months can have 4 or 5 of the same weekdays in it)

Params:

  • 1 defaults to 'first'. positive numbers mean first (1), second (2).. Other numbers mean last (0), second to last (-1)
  • 6 defaults to 'Saturday' 0=Sunday, 1=Monday...
  • 09 defaults to month of upcoming occurrence (this or next month)
  • 2019 defaults to year of upcoming occurrence (this or next year)

The use of {{NthDayOfMonth}} would result in:

7-09-2019