Skip to content

Increase accuracy of year rollover date calculations#111

Merged
simong merged 2 commits intofronteerio:rolloverfrom
ucamhal:rollover
May 20, 2015
Merged

Increase accuracy of year rollover date calculations#111
simong merged 2 commits intofronteerio:rolloverfrom
ucamhal:rollover

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