Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase accuracy of year rollover date calculations #111

Merged
merged 2 commits into from
May 20, 2015

Conversation

ucamhal
Copy link

@ucamhal ucamhal commented May 20, 2015

This gives grasshopper the same rollover behaviour as Timetable 3.

The command which generates the dataset used in the tests is available here: CUL-DigitalServices/timetable-3#1

h4l added 2 commits May 20, 2015 01:14
- The days offset was sometimes incorrect as the time of the timestamp
  was affecting the diff(xx, 'days') call. The time is now stripped off
  before calculating day difference
- The wrong term was selected for events just before the start of
  easter and lent terms. I've changed the term calculation to use the
  nearest term to the timestamp, so (for example) events in weeks -1
  are handled correctly
An external dataset of the timestamps of various days in the academic
year is used.
@simong simong self-assigned this May 20, 2015
@simong simong merged commit f54c376 into fronteerio:rollover May 20, 2015
@simong
Copy link
Contributor

simong commented May 20, 2015

Thanks a bunch Hal, I've tweaked some things so it matches our styleguide and merged this into my rollover branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants