private void setWeekdayIfInFuture(Calendar calendar) {
        // Not set by options
        if (!triggerEveryJSONObject.has("weekday")) return;

        // Only set if in future. For weekday 1 is Monday and for Calendar it is 2,
        // so we have to consider it
        if (calendar.get(Calendar.DAY_OF_WEEK) < 1 + triggerEveryJSONObject.optInt("weekday")) {
            calendar.set(Calendar.DAY_OF_WEEK, 1 + triggerEveryJSONObject.optInt("weekday"));
        }
    }
Sets a configured weekday only if it is in the future. This should prevent the calendar
jump to the last month or year, if the date was set to the first of a month or year.
src/android/trigger/TriggerHandlerEvery.java