Skip to content

Conversation

@alexdutton
Copy link
Contributor

The previous way of finding the start of a term for a date had the following issues:

  • it looked through all known term starts and compared against each. As the number of known-about terms increases, this is going to get slightly slow (particularly when looking up lots of dates)
  • it will never return the last known-about term as it always finds a pair of term starts between which the given date falls

This narrows the search range down to a year either side of the date (I think this could be reduced further to the year before and the current year; however as it searches forwards in time, it should never reach the last year).

It will also return the last term when appropriate.

@davbo
Copy link
Contributor

davbo commented Feb 3, 2014

@alexsdutton were you adding some tests for this?

@alexdutton
Copy link
Contributor Author

Yes, but I'm being slow. It probably won't be this week.

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.

3 participants