Class LocalDatePeriod

  • All Implemented Interfaces:
    java.io.Serializable

    public class LocalDatePeriod
    extends TemporalPeriod<java.time.LocalDate>
    Local date period. For example, 2010-3-18 to 2011-5-18
    Since:
    5.11
    See Also:
    Serialized Form
    • Constructor Detail

      • LocalDatePeriod

        public LocalDatePeriod​(java.time.LocalDate startDate,
                               boolean startDateInclusive,
                               java.time.LocalDate endDate,
                               boolean endDateInclusive)
        Constructor for a date period (not timestamp).
        Parameters:
        startDate - start date
        startDateInclusive - whether startDate is inclusive
        endDate - end date
        endDateInclusive - whether endDate is inclusive
    • Method Detail

      • toInstantPeriod

        public InstantPeriod toInstantPeriod​(java.util.TimeZone timeZone)
        Convert this period to instant period at the time zone, and return a new instance.
        Specified by:
        toInstantPeriod in class TemporalPeriod<java.time.LocalDate>
        Parameters:
        timeZone - time zone
        Returns:
        InstantPeriod instance
      • merge

        public LocalDatePeriod merge​(DatePeriod<java.time.LocalDate> datePeriod)
        Description copied from class: DatePeriod
        Create a new date period from the start date of this datePeriod and the end date of the passed datePeriod.
        Specified by:
        merge in class DatePeriod<java.time.LocalDate>
        Parameters:
        datePeriod - date period
        Returns:
        merged DatePeriod
      • getStartLocalDate

        public java.time.LocalDate getStartLocalDate​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get start local date.
        Specified by:
        getStartLocalDate in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        local date
      • getEndLocalDate

        public java.time.LocalDate getEndLocalDate​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get end local date.
        Specified by:
        getEndLocalDate in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        local date
      • getStartLocalDateTime

        public java.time.LocalDateTime getStartLocalDateTime​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get start local date time.
        Specified by:
        getStartLocalDateTime in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        local date time
      • getEndLocalDateTime

        public java.time.LocalDateTime getEndLocalDateTime​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get end local date time.
        Specified by:
        getEndLocalDateTime in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        local date time
      • getStartInstant

        public java.util.Date getStartInstant​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get start instant in time line.
        Specified by:
        getStartInstant in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        date
      • getEndInstant

        public java.util.Date getEndInstant​(java.util.TimeZone timeZone)
        Description copied from class: DatePeriod
        Get end instant in time line.
        Specified by:
        getEndInstant in class DatePeriod<java.time.LocalDate>
        Parameters:
        timeZone - the time zone for time conversion if needed
        Returns:
        date