diff --git a/pages/api/season.js b/pages/api/season.js
index 52cfb81..c3066cc 100644
--- a/pages/api/season.js
+++ b/pages/api/season.js
@@ -1,3 +1,7 @@
+function daysIntoSeason(date) {
+    return Math.floor((new Date().getTime() - date.getTime()) / (1000 * 60 * 60 * 24))
+}
+
 function getSeason() {
     let year = new Date().getFullYear();
 
@@ -21,11 +25,11 @@
     let currentSeason = Object.keys(dates).find((str) => current >= dates[str][0] && current <= dates[str][1]) || "normal";
     let daysIntoSeason;
     if (currentSeason !== "normal") {
-        daysIntoSeason = Math.floor((new Date().getTime() - dates[currentSeason][0].getTime()) / (1000 * 60 * 60 * 24))
+        daysIntoSeason = daysIntoSeason(dates[currentSeason][0])
     } else {
-        // Calculate days past the most recent season
-        let mostRecentSeason = Object.keys(dates).reduce((a, b) => dates[a][1] > dates[b][1] ? a : b);
-        daysIntoSeason = Math.floor((new Date().getTime() - dates[mostRecentSeason][1].getTime()) / (1000 * 60 * 60 * 24))
+        // Calculate the days from the end of each season
+        let days = Object.keys(dates).map((str) => daysIntoSeason(dates[str][1])).filter((num) => num > 0);
+        daysIntoSeason = Math.min(...days);
     }
 
     return {
