diff --git a/lib/util/DayCalculator.dart b/lib/util/DayCalculator.dart index 5989c60..fae1c13 100644 --- a/lib/util/DayCalculator.dart +++ b/lib/util/DayCalculator.dart @@ -16,44 +16,7 @@ class DayCalculator { } static int getMonthValueByString(String month){ - switch(month){ - case "January":{ - return 0; - } - case "February":{ - return 3; - } - case "March":{ - return 3; - } - case "April":{ - return 6; - } - case "May":{ - return 1; - } - case "June":{ - return 4; - } - case "July":{ - return 6; - } - case "August":{ - return 2; - } - case "September":{ - return 5; - } - case "October":{ - return 0; - } - case "November":{ - return 3; - } - default:{ - return 5; - } - } + return Months.getFromString(month).value; } static int getCenturyValue(int year){