-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Conversation
exercises/meetup/description.md
Outdated
"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, "The fifth Wednesday of October 2017" |
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.
It feels like the last line is missing something at the end. Maybe add " has no matching date"?
exercises/meetup/description.md
Outdated
|
||
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 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.
exercises/meetup/description.md
Outdated
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 |
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. 👍
Great improvement! |
@Insti Would you like to keep the various commits or should I do a squash? |
Personally, I'd keep them, since they are all atomic actions and I prefer to be able to see all the change steps in the git history. |
Merged! Thanks a lot @Insti. 🎉 |
Clarify the problem description for meetup.
This PR is made up of several commits:
The goal here is to make the description less ambiguous by explicitly stating the expected date specifier strings and what to do if there is no matching date.
A consistent format for the input date specifications and only testing against valid input strings helps ensure that this remains a problem about date parsing rather than arbitrary string parsing.
The final commits reformat the text to 80 columns for consistency with other exercise descriptions.