[+] Encapsulate method to get begin date of a term
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import Course from '@/logic/course';
|
import Course from '@/logic/course';
|
||||||
|
import Navigation from '@/components/navigation/navigation';
|
||||||
|
import Constants from '@/constants';
|
||||||
|
|
||||||
const LEVEL_AP = {level: 'AP', scaleUp: 1};
|
const LEVEL_AP = {level: 'AP', scaleUp: 1};
|
||||||
const LEVEL_H = {level: 'H', scaleUp: 0.75};
|
const LEVEL_H = {level: 'H', scaleUp: 0.75};
|
||||||
@@ -64,4 +66,14 @@ export class CourseUtils
|
|||||||
// Really unknown
|
// Really unknown
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the begin date of the selected term
|
||||||
|
*/
|
||||||
|
static getTermBeginDate()
|
||||||
|
{
|
||||||
|
let selected = Navigation.instance.getSelectedGradingPeriod();
|
||||||
|
|
||||||
|
return selected == -1 ? Constants.TERMS[0] : Constants.TERMS[selected];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user