code: public static String getDays(RecurringTask task)
     {
        StringBuilder sb = new StringBuilder();
        for (Day day : Day.values())
        {
           sb.append(task.getWeeklyDay(day) ? "1" : "0");
        }
        return sb.toString();
     }
docs: Convert weekly recurrence days into a bit field.
  
  @param task recurring task
  @return bit field as a string