This project has retired. For details please refer to its
Attic page.
DateUtil (Lens 2.1.0-beta-incubating API)
org.apache.lens.cube.parse
Class DateUtil
java.lang.Object
org.apache.lens.cube.parse.DateUtil
public final class DateUtil
- extends Object
Method Summary |
static String |
formatDate(Date dt)
|
static String |
getAbsDateFormatString(String str)
|
static Date |
getCeilDate(Date fromDate,
UpdatePeriod interval)
|
static Date |
getFloorDate(Date toDate,
UpdatePeriod interval)
|
static DateUtil.CoveringInfo |
getMonthlyCoveringInfo(Date from,
Date to)
|
static int |
getNumberofDaysInMonth(Date date)
|
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 Date |
resolveDate(String str,
Date now)
|
static Date |
resolveRelativeDate(String str,
Date now)
|
LOG
public static final org.apache.log4j.Logger LOG
UNIT
public static final String UNIT
- See Also:
- Constant Field Values
GRANULARITY
public static final String GRANULARITY
- See Also:
- Constant Field Values
RELATIVE
public static final String RELATIVE
- See Also:
- Constant Field Values
P_RELATIVE
public static final Pattern P_RELATIVE
WSPACE
public static final String WSPACE
- See Also:
- Constant Field Values
P_WSPACE
public static final Pattern P_WSPACE
SIGNAGE
public static final String SIGNAGE
- See Also:
- Constant Field Values
P_SIGNAGE
public static final Pattern P_SIGNAGE
QUANTITY
public static final String QUANTITY
- See Also:
- Constant Field Values
P_QUANTITY
public static final Pattern P_QUANTITY
P_UNIT
public static final Pattern P_UNIT
RELDATE_VALIDATOR_STR
public static final String RELDATE_VALIDATOR_STR
- See Also:
- Constant Field Values
RELDATE_VALIDATOR
public static final Pattern RELDATE_VALIDATOR
YEAR_FMT
public static final String YEAR_FMT
- See Also:
- Constant Field Values
MONTH_FMT
public static final String MONTH_FMT
- See Also:
- Constant Field Values
DAY_FMT
public static final String DAY_FMT
- See Also:
- Constant Field Values
HOUR_FMT
public static final String HOUR_FMT
- See Also:
- Constant Field Values
MINUTE_FMT
public static final String MINUTE_FMT
- See Also:
- Constant Field Values
SECOND_FMT
public static final String SECOND_FMT
- See Also:
- Constant Field Values
ABSDATE_FMT
public static final String ABSDATE_FMT
- See Also:
- Constant Field Values
ABSDATE_PARSER
public static final ThreadLocal<DateFormat> ABSDATE_PARSER
formatDate
public static String formatDate(Date dt)
getAbsDateFormatString
public static String getAbsDateFormatString(String str)
resolveDate
public static Date resolveDate(String str,
Date now)
throws org.apache.hadoop.hive.ql.parse.SemanticException
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
resolveRelativeDate
public static Date resolveRelativeDate(String str,
Date now)
throws org.apache.hadoop.hive.ql.parse.SemanticException
- Throws:
org.apache.hadoop.hive.ql.parse.SemanticException
getCeilDate
public static Date getCeilDate(Date fromDate,
UpdatePeriod interval)
getFloorDate
public static Date getFloorDate(Date toDate,
UpdatePeriod interval)
getNumberofDaysInMonth
public static int getNumberofDaysInMonth(Date date)
getMonthlyCoveringInfo
public static DateUtil.CoveringInfo getMonthlyCoveringInfo(Date from,
Date to)
getQuarterlyCoveringInfo
public static DateUtil.CoveringInfo getQuarterlyCoveringInfo(Date from,
Date to)
getYearlyCoveringInfo
public static DateUtil.CoveringInfo getYearlyCoveringInfo(Date from,
Date to)
getWeeklyCoveringInfo
public static DateUtil.CoveringInfo getWeeklyCoveringInfo(Date from,
Date to)
getTimeDiff
public static int getTimeDiff(Date fromDate,
Date toDate,
UpdatePeriod updatePeriod)
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.