Package net.pricefx.common.util
Class CalendarUtil
Object
CalendarUtil
- Direct Known Subclasses:
DMCalendar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
date()
fileInfixTimestamp
(Date date) formatDate
(LocalDate localDate) formatDate
(Date date) formatDateTime
(LocalDateTime localDateTime) formatDateTime
(Date date) formatDateTime
(DateTime dateTime) long
getDaysDiff
(String period2, String period1) getEndDate
(String period) getQuarter
(Date date) getStartDate
(String period) getTimePeriod
(String periodAsString) getTimePeriodByDate
(String dateAsString, String unitAsString) getTimePeriodName
(Date date, CalendarUtil.TimeUnit unit) getTimePeriodNames
(String startPeriodAsString, String endPeriodAsString, String unitAsString) getTimePeriods
(String startPeriodAsString, String endPeriodAsString, String unitAsString) getTimePeriods
(Date startDate, Date endDate, CalendarUtil.TimeUnit unit) newTimePeriod
(String startDateAsString, String unitAsString) newTimePeriod
(String startDateAsString, String endDateAsString, String unitAsString) DateTime
parseDateTime
(String datetimeAsString) parseTimePeriod
(String period) static String
time()
today()
-
Field Details
-
DEFAULT_DATETIME_PATTERN
- See Also:
-
DEFAULT_DATE_PATTERN
- See Also:
-
ALT_DATE_PATTERN_1
- See Also:
-
ALT_DATE_PATTERN_2
- See Also:
-
ALT_DATETIME_PATTERN
- See Also:
-
SIMPLEDATEFORMAT_PATTERN
- See Also:
-
DEFAULT
-
-
Constructor Details
-
CalendarUtil
public CalendarUtil() -
CalendarUtil
-
-
Method Details
-
getYear
-
getQuarter
-
getMonth
-
getWeek
-
getDay
-
today
-
date
-
time
-
fileInfixTimestamp
-
fileInfixTimestamp
-
getTimePeriod
-
newTimePeriod
public CalendarUtil.TimePeriod newTimePeriod(String startDateAsString, String endDateAsString, String unitAsString) -
newTimePeriod
-
getTimePeriodByDate
-
getTimePeriodName
-
getTimePeriodName
-
getTimePeriodNames
-
getTimePeriods
public List<CalendarUtil.TimePeriod> getTimePeriods(String startPeriodAsString, String endPeriodAsString, String unitAsString) -
getTimePeriods
public List<CalendarUtil.TimePeriod> getTimePeriods(Date startDate, Date endDate, CalendarUtil.TimeUnit unit) -
getStartDate
-
getEndDate
-
add
-
getDaysDiff
-
parseTimePeriod
- Throws:
ParseException
-
parseDate
-
parseDateTime
-
formatDate
-
formatDate
-
formatDateTime
-
formatDateTime
-
formatDateTime
-