Skip to content

Commit 124c2ad

Browse files
meetup: update description (#1868)
meetup: update description to help clarify what is expected of the student Co-authored-by: Erik Schierboom <[email protected]>
1 parent 5bf8c7d commit 124c2ad

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

exercises/meetup/description.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
# Description
22

3-
Calculate the date of meetups.
4-
5-
Typically meetups happen on the same day of the week. In this exercise, you
6-
will take a description of a meetup date, and return the actual meetup date.
3+
In this exercise, you will be given a general description of a meetup date and then asked to find the actual meetup date.
74

85
Examples of general descriptions are:
96

10-
- The first Monday of January 2017
11-
- The third Tuesday of January 2017
12-
- The wednesteenth of January 2017
13-
- The last Thursday of January 2017
7+
- First Monday of January 2022
8+
- Third Tuesday of August 2021
9+
- Teenth Wednesday of May 2022
10+
- Teenth Sunday of July 2021
11+
- Last Thursday of November 2021
1412

15-
The descriptors you are expected to parse are:
16-
first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
17-
thursteenth, friteenth, saturteenth, sunteenth
13+
The descriptors you are expected to process are: `first`, `second`, `third`, `fourth`, `fifth`, `last`, `teenth`.
1814

19-
Note that "monteenth", "tuesteenth", etc are all made up words. There was a
20-
meetup whose members realized that there are exactly 7 numbered days in a month
21-
that end in '-teenth'. Therefore, one is guaranteed that each day of the week
22-
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
23-
in every month.
15+
Note that descriptor `teenth` is a made-up word.
16+
There are exactly seven numbered days in a month that end with "teenth" ("thirteenth" to "nineteenth").
17+
Therefore, it is guaranteed that each day of the week (Monday, Tuesday, ...) will have exactly one numbered day ending with "teenth" each month.
2418

25-
Given examples of a meetup dates, each containing a month, day, year, and
26-
descriptor calculate the date of the actual meetup. For example, if given
27-
"The first Monday of January 2017", the correct meetup date is 2017/1/2.
19+
For example, if given "First Monday of January 2022", the correct meetup date is January 3, 2022.

0 commit comments

Comments
 (0)