[F] Account for all year situation

This commit is contained in:
Hykilpikonna
2019-12-07 15:07:47 -05:00
parent 4a220ddc60
commit ef44e4d149
@@ -88,7 +88,8 @@ export default class OverallLine extends Vue
private getStartDate()
{
// If it's a past term, use the term's end date, else use today.
let end = Navigation.instance.getSelectedTerm() == Constants.CURRENT_TERM
let selected = Navigation.instance.getSelectedTerm();
let end = selected == Constants.CURRENT_TERM || selected == -1
? moment() : moment(CourseUtils.getTermEndDate());
return Math.max(end.subtract(30, 'days').toDate().getTime(),