Fix off-by-one applicant free time & days available figures #532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the "Time commitment in application" discussion thread in chat, where Sage reported the off-by-one numbers are a known issue. This can be reproduce with the ready-made InternshipWeekScenario, with week 1.
For coordinators / mentors this appears in two places:
Screenshots for reference:
The calculation of the internship length seems to be inclusive of both the start and end date, without needing the
+ 1
.I chose to remove the increment because there are already two other places in the code where the same calculation is made without it:
website/home/views.py
Line 1994 in d2ced82
website/home/models.py
Line 2840 in d2ced82
That second occurrence in particular is what’s used for both calculations that were showing the off-by-one error.