sealevelresearch/sea-level-api — pull request #39 by paulfurley (2014-07-08 11:09:07+00:00)
Title: Implement extended tide windows

When we receive a request for tide windows with a `start` and `end` we
want to return any windows which overlap either of those points - ie if we
say start of 12:00 and there's a window from 10:00 to 14:00 we should
return 10:00 as the start - not 12:00.

- extend the initial `Predictions` query by 24 hours in either direction
from `start` and `end`
- any tide windows which fall within that period *and* are at least
partially inside the `start` and `end` should be fully included.
- if a tide window extends past 24 hour extended period, assume that the
water
level is *always* above the query, and truncate it down to the `start`
/ `end` point.

https://www.pivotaltracker.com/story/show/74438722

[Delivers #74438722]
[Fixes #74440840]