Skip to content

meetup: correct example in description.md #1006

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

Closed
wants to merge 1 commit into from
Closed

meetup: correct example in description.md #1006

wants to merge 1 commit into from

Conversation

wolf99
Copy link
Contributor

@wolf99 wolf99 commented Nov 14, 2017

The third Tuesday of January 2017 was the 17th and thus should either be specified as a "-teenth" or be a different Tuesday. I went with the latter.

This confused me no end when trying to grok what qualified a day to be "teenth" or not >.<

The *third* Tuesday of January 2017 was the 17th and thus should either be specified as a "-teenth" or be a different Tuesday. I went with the latter.
@wolf99 wolf99 changed the title Correct example description meetup: correct example in description.md Nov 14, 2017
@wolf99
Copy link
Contributor Author

wolf99 commented Nov 14, 2017

Hmm, checking the canonical data I think maybe I still haven't groked it!
I see the following examples (among others) from that file:

    {
      "description": "second Tuesday of May 2013",
      "property": "meetup",
      "year": 2013,
      "month": 5,
      "week": "second",
      "dayofweek": "Tuesday",
      "dayofmonth": 14
    },
    {
      "description": "second Wednesday of August 2013",
      "property": "meetup",
      "year": 2013,
      "month": 8,
      "week": "second",
      "dayofweek": "Wednesday",
      "dayofmonth": 14
    },

These specify days that have a date that is a teen, but that are not expected to return "teenth"?
So what exactly is it that qualifies a day of the week as "teenth" or not?

@m-dango
Copy link
Member

m-dango commented Nov 14, 2017

I think you may be looking at it backwards. The description of the date goes in e.g second/-teenth Tuesday of May 2013, and the actual date e.g. 2013-05-14 comes out.

Dates which are -teenth will always overlap with dates in either second or third.

@ErikSchierboom
Copy link
Member

Dates which are -teenth will always overlap with dates in either second or third.

Well put. The input to this problem is the year/month/day (first, second, third, teenth, last) and the output is a date. Hence why there will be an overlap.

@wolf99
Copy link
Contributor Author

wolf99 commented Nov 14, 2017

Light dawns. Thanks folks!

@wolf99 wolf99 closed this Nov 14, 2017
@Insti
Copy link
Contributor

Insti commented Nov 14, 2017

The input should be a phrase and the output should be a date.
The exploded nature of the properties in the canonical data is not really helpful here.
Hopefully we can fix this.
See also: #996

    {
      "description": "why this date is useful to test",
      "property": "meetup",
      "input": { "phrase": "second Wednesday of August 2013" },
      "expected": { "year": 2013, "month": 8, "dayofmonth": 14 }
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants