Class Recurring

    • Constructor Detail

      • Recurring

        public Recurring()
    • Method Detail

      • parse

        public static Recurring parse​(String recurring)
                               throws IllegalArgumentException
        Parses a human-readable representation of a recurring schedule. All parsing case-insensitive. Supported values are:
        • "everyday" - Task must be done every day
        • "weekdays" - Monday through Friday (no holidays scheduled - yet)
        • "on day-of-week-list" - on a comma-separated list of days of the week. The day of the week for the "on" date must be in this list. Example: "on Monday, Wednesday, Friday". Example: "On mon, tue, Sat".
        • "weekly" - recurring on the same day every week.
        • "monthly" - recurring on the same day every month. If the day is past the last day of the month, the last day of the month is used.
        • "yearly" - recurring on the same day every year. If the day is past the last day of the month for a given year, the last day of the month is used. (Only affects February 29th)
        • "every ### {days|weeks|months|years}" - recurring every unit days. For "months", if the day is past the last day of the month, the last day of the month is used.
        Parameters:
        recurring - when null, returns null
        Throws:
        IllegalArgumentException - if unable to parse recurring
      • equals

        public abstract boolean equals​(Object o)
        Recurring schedules are equal when they have both the same type and schedule.
        Overrides:
        equals in class Object
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object
      • getRecurringDisplay

        public abstract String getRecurringDisplay()
      • checkScheduleFrom

        public String checkScheduleFrom​(Calendar from,
                                        String attribute)
        Checks if the schedule can start on the given day. Returns null if OK or a string reason of why not OK.
      • getScheduleIterator

        public abstract Iterator<Calendar> getScheduleIterator​(Calendar from)
        Gets an iterator over dates in the YYYY-MM-DD format. The iteration starts at the given date.