public void addInterval(Calendar calendar, String triggerUnit, int amount) {
        switch (triggerUnit) {
            case "second":
                calendar.add(Calendar.SECOND, amount);
                break;

            case "minute":
                calendar.add(Calendar.MINUTE, amount);
                break;

            case "hour":
                calendar.add(Calendar.HOUR_OF_DAY, amount);
                break;

            case "day":
                calendar.add(Calendar.DAY_OF_YEAR, amount);
                break;

            case "week":
                calendar.add(Calendar.WEEK_OF_YEAR, amount);
                break;

            case "month":
                calendar.add(Calendar.MONTH, amount);
                break;

            case "quarter":
                calendar.add(Calendar.MONTH, amount * 3);
                break;

            case "year":
                calendar.add(Calendar.YEAR, amount);
                break;

            default:
                throw new IllegalArgumentException("Unknown trigger unit: " + triggerUnit);
        }
    }
Adds the amount of triggerUnit to the calendar.
@param calendar The calendar to manipulate.
src/android/trigger/TriggerHandler.java