-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3c4c515
Enumerate valid descriptors
Insti 2958907
Lowercase '*teenth' descriptors
Insti d432cfe
Add description of what to do if there is no date.
Insti fd29a22
Note that all descriptions will be valid.
Insti 85ef981
Make descriptions consistent.
Insti 31b01d5
Reformat text to fit in 80 columns.
Insti d4e23c0
Keep quoted text on a single line.
Insti e5dea5b
Clarify example of no matching date.
Insti 2b4cfb6
Leave invalid date handling undefined.
Insti a14276c
Add period / Remove trailing whitespace.
Insti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we even be testing with invalid dates? I suggest removing the last section completely and leaving error cases undefined by the canonical data. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. 👍