org.apache.lens.cube.parse
Class DateUtil
java.lang.Object
org.apache.lens.cube.parse.DateUtil
public final class DateUtil
- extends Object
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 SimpleDateFormat 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)
getMonthsBetween
public static int getMonthsBetween(Date from,
Date to)
getQuartersBetween
public static int getQuartersBetween(Date from,
Date to)
getYearsBetween
public static int getYearsBetween(Date from,
Date to)
getWeeksBetween
public static int getWeeksBetween(Date from,
Date to)
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.