fromStringDE method
Converts a German string into a Weekday
(case-insensetive).
Errors if given day of week is not valid.
Implementation
static Weekday fromStringDE(String input) {
switch (input.toLowerCase()) {
case 'montag':
return Weekday.Monday;
break;
case 'dienstag':
return Weekday.Tuesday;
break;
case 'mittwoch':
return Weekday.Wednesday;
break;
case 'donnerstag':
return Weekday.Thursday;
break;
case 'freitag':
return Weekday.Friday;
break;
default:
throw 'Invalid day of week!';
}
}