updated getMonthValueByString in DayCalculator to use Months class

This commit is contained in:
BroodjeAap 2020-10-20 17:04:33 +02:00
parent 0de095167e
commit 771c411723

View file

@ -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){