GreenInfo-Network / DDH_HomelessServices

Dorothy Day House, Homeless Services
MIT License
1 stars 0 forks source link

When Search = TODAY, include items without End Time or solve overnight in another way #28

Closed danrademacher closed 6 years ago

danrademacher commented 6 years ago

We added a new overnight shelter service: image

Which then showed a problem with the filter we added for today's events that are over. The shelter starts at 6:45 PM and ends at 7 AM the next day.

So we tried removing the end time, but that didn't work because of this code:

https://github.com/GreenInfo-Network/DDH_HomelessServices/blob/master/index.js6#L315-L319

Solutions would be either just include services without end time and inform data entry folks about that, or better but harder, account for overnight events where end time is the next day...

gregallensworth commented 6 years ago

Good eye! And a correct diagnosis, and an easy fix.

An event with no EndTime, will return true when the still-happening-today filter is applied, on grounds that it cannot be confirmed as having already ended. This does appear to make the two shelter services show up as intended.