Skip to content
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

Yesterday/Today are instead of month+dayofmonth and not just instead … #136

Merged
merged 2 commits into from
Nov 9, 2020
Merged

Conversation

TheMulti0
Copy link
Contributor

Fixes a bug in #135 where 'Yesterday' or 'Today' dates are equivalent to November\December and must be followed with a day-of-month digit.

This relative day specification is not equivalent to month and day-of-month.

@kevinzg
Copy link
Owner

kevinzg commented Nov 9, 2020

It's not working for April 3, 2018 at 8:02 PM.
Could you comment all the different date formats you have found? We should create some unit tests for them.

@TheMulti0
Copy link
Contributor Author

It's not working for April 3, 2018 at 8:02 PM.
Could you comment all the different date formats you have found? We should create some unit tests for them.

That's right.

These are the ones we found so far:

  1. Oct 16 at 11:00 PM
  2. October 16 at 11:00 PM
  3. October 16, 2019 at 8:00PM
  4. Yesterday at 11:00 PM
  5. Today at 11:00 PM
  6. 16 hrs (16 hours ago)
  7. 16h (16 hours ago)

@TheMulti0
Copy link
Contributor Author

@kevinzg I added simple tests, they all fell but removing an extra whitespace from the regex solved it, all of the different formats now work. (check out the new test file so you can see all the different example of dates).

kevinzg added a commit that referenced this pull request Nov 9, 2020
@kevinzg kevinzg merged commit ac660ed into kevinzg:master Nov 9, 2020
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.

2 participants