chr-1x / hmh_bot

Python modules for the Willie IRC bot used in the Handmade Hero twitch chat.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bot intreprets "12/23" as "12/23/2015"

chr-1x opened this issue · comments

parsedatetime assumes the date is the next occurrence even if its almost a year later.

Need steps to reproduce the error in order to troubleshoot.

  1. set the schedule of a date that has already gone by (at the time of this comment, a good example would be 12/25/2014) to something non-default, like 10 am. Be sure to specify year. Alternatively, use the "yesterday" keyword. (The original occurrence of this bug was noticed when a rescheduled time had been passed)
  2. use !schedule 12/25 or the month/day of whatever "yesterday" ended up being. The bot should tell you something other than what you scheduled it to. If you put in some debug traces, you should see that the date its returning is that of the next year.

This was also fixed with my PR.

I just did some testing and it does not appear to be fixed. As of 1/17 at 10am PST, I get the following output:

!schedule 1/16
"No stream scheduled for Jan 16"
!schedule 1/16/2015
"The stream should have aired Jan 16 09:00 AM PST"