Package com.cmobilecom.af.entity.report
Class LocalDatePeriod
- java.lang.Object
-
- com.cmobilecom.af.entity.report.DatePeriod<T>
-
- com.cmobilecom.af.entity.report.TemporalPeriod<java.time.LocalDate>
-
- com.cmobilecom.af.entity.report.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
-
-
Field Summary
-
Fields inherited from class com.cmobilecom.af.entity.report.DatePeriod
endDate, endDateInclusive, startDate, startDateInclusive
-
-
Constructor Summary
Constructors Constructor Description LocalDatePeriod(java.time.LocalDate startDate, boolean startDateInclusive, java.time.LocalDate endDate, boolean endDateInclusive)
Constructor for a date period (not timestamp).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getEndInstant(java.util.TimeZone timeZone)
Get end instant in time line.java.time.LocalDate
getEndLocalDate(java.util.TimeZone timeZone)
Get end local date.java.time.LocalDateTime
getEndLocalDateTime(java.util.TimeZone timeZone)
Get end local date time.java.util.Date
getStartInstant(java.util.TimeZone timeZone)
Get start instant in time line.java.time.LocalDate
getStartLocalDate(java.util.TimeZone timeZone)
Get start local date.java.time.LocalDateTime
getStartLocalDateTime(java.util.TimeZone timeZone)
Get start local date time.LocalDatePeriod
merge(DatePeriod<java.time.LocalDate> datePeriod)
Create a new date period from the start date of this datePeriod and the end date of the passed datePeriod.InstantPeriod
toInstantPeriod(java.util.TimeZone timeZone)
Convert this period to instant period at the time zone, and return a new instance.-
Methods inherited from class com.cmobilecom.af.entity.report.DatePeriod
after, before, contains, getEndDate, getMonthDatePeriod, getMonthDatePeriod, getNextMonthDatePeriod, getPeriod, getQuarterDatePeriod, getStartDate, getYearDatePeriod, isEndDateInclusive, isParsed, isStartDateInclusive, setEndDate, setEndDateInclusive, setParsed, setPeriod, setStartDate, setStartDateInclusive
-
-
-
-
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 datestartDateInclusive
- whether startDate is inclusiveendDate
- end dateendDateInclusive
- 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 classTemporalPeriod<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 classDatePeriod<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 classDatePeriod<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 classDatePeriod<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 classDatePeriod<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 classDatePeriod<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 classDatePeriod<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 classDatePeriod<java.time.LocalDate>
- Parameters:
timeZone
- the time zone for time conversion if needed- Returns:
- date
-
-