|
2 | 2 |
|
3 | 3 | Calculate the date of meetups. |
4 | 4 |
|
5 | | -Typically meetups happen on the same day of the week. In this exercise, you will take |
6 | | -a description of a meetup date, and return the actual meetup date. |
| 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. |
7 | 7 |
|
8 | 8 | Examples of general descriptions are: |
9 | 9 |
|
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 |
| 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 |
14 | 14 |
|
15 | | -Note that "Monteenth", "Tuesteenth", etc are all made up words. There |
16 | | -was a meetup whose members realized that there are exactly 7 numbered days in a month that |
17 | | -end in '-teenth'. Therefore, one is guaranteed that each day of the week |
| 15 | +The descriptors you are expected to parse are: |
| 16 | +first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth, |
| 17 | +thursteenth, friteenth, saturteenth, sunteenth |
| 18 | + |
| 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 |
18 | 22 | (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth' |
19 | 23 | in every month. |
20 | 24 |
|
21 | | -Given examples of a meetup dates, each containing a month, day, year, and descriptor |
22 | | -(first, second, teenth, etc), calculate the date of the actual meetup. |
23 | | -For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2 |
| 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. |
24 | 28 |
|
25 | 29 | # Running the tests |
26 | 30 |
|
|
0 commit comments