Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
runSpansMonths(run: StudentRun) {
if (this.runSpansYears(run)) {
return true;
}
const startMonth = (new DateFormatPipe()).transform(run.startTime, 'M');
const endMonth = (new DateFormatPipe()).transform(run.endTime, 'M');
return startMonth != endMonth;
}
runSpansMonths(run: StudentRun) {
if (this.runSpansYears(run)) {
return true;
}
const startMonth = (new DateFormatPipe()).transform(run.startTime, 'M');
const endMonth = (new DateFormatPipe()).transform(run.endTime, 'M');
return startMonth != endMonth;
}
runSpansYears(run: TeacherRun) {
const startYear = new DateFormatPipe().transform(run.startTime, 'Y');
const endYear = new DateFormatPipe().transform(run.endTime, 'Y');
return startYear != endYear;
}
runSpansYears(run: StudentRun) {
const startYear = (new DateFormatPipe()).transform(run.startTime, 'Y');
const endYear = (new DateFormatPipe()).transform(run.endTime, 'Y');
return startYear != endYear;
}
runSpansYears(run: TeacherRun) {
const startYear = new DateFormatPipe().transform(run.startTime, 'Y');
const endYear = new DateFormatPipe().transform(run.endTime, 'Y');
return startYear != endYear;
}
runSpansDays(run: TeacherRun) {
if (this.runSpansMonths(run)) {
return true;
}
const startDay = new DateFormatPipe().transform(run.startTime, 'D');
const endDay = new DateFormatPipe().transform(run.endTime, 'D');
return startDay != endDay;
}