public static void setDay(Day day, SettingsManager settingsManager) {
        if (settingsManager.getWeekendDays() != null) {
            day.setWeekend(settingsManager.getWeekendDays().contains(day.getCalendar().get(Calendar.DAY_OF_WEEK)));
        }

        if (settingsManager.getDisabledDays() != null) {
            day.setDisabled(isDayInSet(day, settingsManager.getDisabledDays()));
        }

        if (settingsManager.getDisabledDaysCriteria() != null) {
            if(!day.isDisabled()){
                day.setDisabled(isDayDisabledByCriteria(day, settingsManager.getDisabledDaysCriteria()));
            }
        }

        if (settingsManager.getConnectedDaysManager().isAnyConnectedDays()) {
            settingsManager.getConnectedDaysManager().applySettingsToDay(day);
        }
    }
Sets variables(isWeekend, isDisabled, isFromConnectedCalendar) to day
cosmocalendar/src/main/java/com/applikeysolutions/cosmocalendar/utils/CalendarUtils.java