This project has retired. For details please refer to its
Attic page.
DateUtil (Lens 2.0.1-beta-incubating API)
org.apache.lens.cube.parse
Class DateUtil
java.lang.Object
org.apache.lens.cube.parse.DateUtil
public 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 String YEAR_FMT
MONTH_FMT
public static String MONTH_FMT
DAY_FMT
public static String DAY_FMT
HOUR_FMT
public static String HOUR_FMT
MINUTE_FMT
public static String MINUTE_FMT
SECOND_FMT
public static String SECOND_FMT
ABSDATE_FMT
public static final String ABSDATE_FMT
- See Also:
- Constant Field Values
ABSDATE_PARSER
public static final SimpleDateFormat ABSDATE_PARSER
DateUtil
public DateUtil()
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.