the-blue-alliance / the-blue-alliance-android

An Android app for accessing information about the FIRST Robotics Competition.
MIT License
76 stars 34 forks source link

Fix some offseason events not showing up #887

Closed bherbst closed 5 years ago

bherbst commented 5 years ago

Summary: The logic for fetching events within a given month was funky in a few ways:

This new logic uses the correct time, and only checks that the event's start date lies within the month. If an event starts in July and ends in August, it is bucketed as a July event.

Issues Reference: Fixes #870

Test Plan: Unfortunately the APICache (particularly with the database) isn't particularly well set up for unit tests, but I'd like to get there eventually.

For manual testing, September 2018 contains events on September 1st (Battleship Blast Day 1) and September 30th (2018 CORI Invitational) that serve as good start/end logic checks within the month. July 2018 contains an event (RCC aka Region China Champions) that straddles the July - August boundary.

Battleship Blast Day 1 and RCC previously did not show up, and now do.

phil-lopreiato commented 5 years ago

Nice catch! You're right - this was super clowny the way it was before, thanks for the fix!