fromStringDE method

WeekType fromStringDE (String input)

Converts a German string into a WeekType. Errors if given type of week is not valid.

Implementation

static WeekType fromStringDE(String input) {
  switch (input) {
    case 'A-Woche':
      return WeekType.A;
      break;

    case 'B-Woche':
      return WeekType.B;
      break;

    default:
      throw 'Invalid type of week!';
  }
}