Class DayDuration


  • public class DayDuration
    extends Object
    Represents a number of days.
    • Field Detail

      • ZERO_DAYS

        public static final DayDuration ZERO_DAYS
        Some commonly used constant durations.
    • Constructor Detail

    • Method Detail

      • valueOf

        public static DayDuration valueOf​(String duration)
        Parses a duration compatible with results of toString. Supports:
        1. # day
        2. # days
        3. # week
        4. # weeks
        5. # month
        6. # months
        7. # year
        8. # years
        See Also:
        toString()
      • getCount

        public int getCount()
      • offset

        public void offset​(Calendar cal)
        Offsets the given calendar by the unit and count. The passed-in Calendar is modified.