class DateFilterHelper {

  protected Calendar getCalendar() {
    return Calendar.getInstance(Locale.UK);
  }

  @SuppressWarnings("ControlFlowStatementWithoutBraces")
  protected int getDayOfWeek(String dayStr) {
    String day = StringTools.trimSpecialCharacters(dayStr).toLowerCase();  // quickfix for special characters like soft hyphens
    if (day.startsWith("dom")) return Calendar.SUNDAY;
    if (day.startsWith("seg")) return Calendar.MONDAY;
    if (day.startsWith("ter")) return Calendar.TUESDAY;
    if (day.startsWith("qua")) return Calendar.WEDNESDAY;
    if (day.startsWith("qui")) return Calendar.THURSDAY;
    if (day.startsWith("sex")) return Calendar.FRIDAY;
    if (day.startsWith("sáb")) return Calendar.SATURDAY;
    throw new RuntimeException("Could not find day of week for '" + dayStr + "'");
  }

  @SuppressWarnings("ControlFlowStatementWithoutBraces")
  protected String getDayOfWeek(Calendar date) {
    String englishDay = date.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.UK);
    if (englishDay.equals("Sunday")) return "domingo";
    if (englishDay.equals("Monday")) return "segunda-feira";
    if (englishDay.equals("Tuesday")) return "terça-feira";
    if (englishDay.equals("Wednesday")) return "quarta-feira";
    if (englishDay.equals("Thursday")) return "quinta-feira";
    if (englishDay.equals("Friday")) return "sexta-feira";
    if (englishDay.equals("Saturday")) return "sábado";
    return "";
  }

  @SuppressWarnings({"ControlFlowStatementWithoutBraces", "MagicNumber"})
  protected int getMonth(String monthStr) {<FILL_FUNCTION_BODY>}
}

    String mon = StringTools.trimSpecialCharacters(monthStr).toLowerCase();  // quickfix for special characters like soft hyphens
    if (mon.startsWith("jan")) return 1;
    if (mon.startsWith("fev")) return 2;
    if (mon.startsWith("mar")) return 3;
    if (mon.startsWith("abr")) return 4;
    if (mon.startsWith("mai")) return 5;
    if (mon.startsWith("jun")) return 6;
    if (mon.startsWith("jul")) return 7;
    if (mon.startsWith("ago")) return 8;
    if (mon.startsWith("set")) return 9;
    if (mon.startsWith("out")) return 10;
    if (mon.startsWith("nov")) return 11;
    if (mon.startsWith("dez")) return 12;
    throw new RuntimeException("Could not find month '" + monthStr + "'");
  
<no_super_class>