Skip to content

meetup: Clarify description #982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 8, 2017
32 changes: 20 additions & 12 deletions exercises/meetup/description.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
Calculate the date of meetups.

Typically meetups happen on the same day of the week. In this exercise, you will take
a description of a meetup date, and return the actual meetup date.
Typically meetups happen on the same day of the week. In this exercise, you
will take a description of a meetup date, and return the actual meetup date.

Examples of general descriptions are:

- the first Monday of January 2017
- the third Tuesday of January 2017
- the Wednesteenth of January 2017
- the last Thursday of January 2017
- The first Monday of January 2017
- The third Tuesday of January 2017
- The wednesteenth of January 2017
- The last Thursday of January 2017

Note that "Monteenth", "Tuesteenth", etc are all made up words. There
was a meetup whose members realized that there are exactly 7 numbered days in a month that
end in '-teenth'. Therefore, one is guaranteed that each day of the week
The descriptors you are expected to parse are:
first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
thursteenth, friteenth, saturteenth, sunteenth

Note that "monteenth", "tuesteenth", etc are all made up words. There was a
meetup whose members realized that there are exactly 7 numbered days in a month
that end in '-teenth'. Therefore, one is guaranteed that each day of the week
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
in every month.

Given examples of a meetup dates, each containing a month, day, year, and descriptor
(first, second, teenth, etc), calculate the date of the actual meetup.
For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
Given examples of a meetup dates, each containing a month, day, year, and
descriptor calculate the date of the actual meetup. For example, if given
"The first Monday of January 2017", the correct meetup date is 2017/1/2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a dot (.) at the end of the line, or was that on purpose?.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Insti small bump for my comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I needed the bump. 👍


All descriptions will be valid, but you will need to return an error if there
is no matching date. For example, October 2017 has five Tuesdays but only four
Wednesdays. There is no date that matches "The fifth Wednesday of October 2017"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even be testing with invalid dates?
We're not testing other invalid inputs.

I suggest removing the last section completely and leaving error cases undefined by the canonical data.