Commit bd8e0e2d authored by Piotr Romanowski's avatar Piotr Romanowski

Always use normal diff when calculating total school year duration

parent f5c3b19b
......@@ -32,7 +32,7 @@ const Countdown = () => {
const vacationStart = moment(VacationStart, 'DD-MM-YYYY');
const schoolStart = moment(SchoolStart, 'DD-MM-YYYY');
const totalDays = skipDaysOff ? vacationStart.businessDiff(schoolStart) : vacationStart.diff(schoolStart, 'days');
const totalDays = vacationStart.diff(schoolStart, 'days');
const daysLeft = skipDaysOff ? vacationStart.businessDiff(now) : vacationStart.diff(now, 'days');
const percentage = 100 - (daysLeft / totalDays * 100);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment