public final class DateUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DateUtil.CoveringInfo |
static class |
DateUtil.TimeDiff |
Modifier and Type | Field and Description |
---|---|
static String |
ABSDATE_FMT |
static ThreadLocal<DateFormat> |
ABSDATE_PARSER |
static String |
DAY_FMT |
static String |
GRANULARITY |
static String |
HIVE_QUERY_DATE_FMT |
static ThreadLocal<DateFormat> |
HIVE_QUERY_DATE_PARSER |
static String |
HOUR_FMT |
static Date |
MAX_DATE |
static String |
MILLISECOND_FMT |
static Date |
MIN_DATE |
static String |
MINUTE_FMT |
static String |
MONTH_FMT |
static String |
OPTIONAL_WSPACE |
static Pattern |
P_QUANTITY |
static Pattern |
P_RELATIVE |
static Pattern |
P_SIGNAGE |
static Pattern |
P_UNIT |
static String |
QUANTITY |
static String |
RELATIVE |
static Pattern |
RELDATE_VALIDATOR |
static String |
RELDATE_VALIDATOR_STR |
static String |
SECOND_FMT |
static String |
SIGNAGE |
static Pattern |
TIMESTAMP_VALIDATOR |
static String |
UNIT |
static String |
WSPACE |
static String |
YEAR_FMT |
Modifier and Type | Method and Description |
---|---|
static String |
getAbsDateFormatString(String str) |
static Date |
getCeilDate(Date date,
UpdatePeriod interval) |
static Date |
getFloorDate(Date date,
UpdatePeriod interval) |
static DateUtil.CoveringInfo |
getMonthlyCoveringInfo(Date from,
Date to) |
static DateUtil.CoveringInfo |
getQuarterlyCoveringInfo(Date from,
Date to) |
static int |
getTimeDiff(Date fromDate,
Date toDate,
UpdatePeriod updatePeriod) |
static DateUtil.CoveringInfo |
getWeeklyCoveringInfo(Date from,
Date to) |
static DateUtil.CoveringInfo |
getYearlyCoveringInfo(Date from,
Date to) |
static String |
relativeToAbsolute(String relative) |
static String |
relativeToAbsolute(String relative,
Date now) |
static Date |
resolveAbsoluteDate(String str) |
static Date |
resolveDate(String str,
Date now) |
static Date |
resolveRelativeDate(String str,
Date now) |
public static final String UNIT
public static final Date MAX_DATE
public static final Date MIN_DATE
public static final String GRANULARITY
public static final String RELATIVE
public static final Pattern P_RELATIVE
public static final String WSPACE
public static final String OPTIONAL_WSPACE
public static final String SIGNAGE
public static final Pattern P_SIGNAGE
public static final String QUANTITY
public static final Pattern P_QUANTITY
public static final Pattern P_UNIT
public static final String RELDATE_VALIDATOR_STR
public static final Pattern RELDATE_VALIDATOR
public static final Pattern TIMESTAMP_VALIDATOR
public static final String YEAR_FMT
public static final String MONTH_FMT
public static final String DAY_FMT
public static final String HOUR_FMT
public static final String MINUTE_FMT
public static final String SECOND_FMT
public static final String MILLISECOND_FMT
public static final String ABSDATE_FMT
public static final String HIVE_QUERY_DATE_FMT
public static final ThreadLocal<DateFormat> ABSDATE_PARSER
public static final ThreadLocal<DateFormat> HIVE_QUERY_DATE_PARSER
public static Date resolveDate(String str, Date now) throws LensException
LensException
public static String relativeToAbsolute(String relative) throws LensException
LensException
public static String relativeToAbsolute(String relative, Date now) throws LensException
LensException
public static Date resolveAbsoluteDate(String str) throws LensException
LensException
public static Date resolveRelativeDate(String str, Date now) throws LensException
LensException
public static Date getCeilDate(Date date, UpdatePeriod interval)
public static Date getFloorDate(Date date, UpdatePeriod interval)
public static DateUtil.CoveringInfo getMonthlyCoveringInfo(Date from, Date to)
public static DateUtil.CoveringInfo getQuarterlyCoveringInfo(Date from, Date to)
public static DateUtil.CoveringInfo getYearlyCoveringInfo(Date from, Date to)
public static DateUtil.CoveringInfo getWeeklyCoveringInfo(Date from, Date to)
public static int getTimeDiff(Date fromDate, Date toDate, UpdatePeriod updatePeriod)
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.