In this exercise, you will be given a general description of a meetup date and then asked to find the actual meetup date.

Examples of general descriptions are:

  • First Monday of January 2022
  • Third Tuesday of August 2021
  • Teenth Wednesday of May 2022
  • Teenth Sunday of July 2021
  • Last Thursday of November 2021

The descriptors you are expected to process are: first, second, third, fourth, last, teenth.

Note that descriptor teenth is a made-up word. There are exactly seven numbered days in a month that end with "teenth" ("thirteenth" to "nineteenth"). Therefore, it is guaranteed that each day of the week (Monday, Tuesday, ...) will have exactly one numbered day ending with "teenth" each month.

For example, if given "First Monday of January 2022", the correct meetup date is January 3, 2022.

Last updated 30 November 2022
Edit via GitHub The link opens in a new window or tab
Elixir Exercism

Ready to start Meetup?

Sign up to Exercism to learn and master Elixir with 57 concepts, 156 exercises, and real human mentoring, all for free.