cn.gtmap.estateplat.utils
类 DateUtils

java.lang.Object
  继承者 org.apache.commons.lang3.time.DateUtils
      继承者 cn.gtmap.estateplat.utils.DateUtils

public class DateUtils
extends org.apache.commons.lang3.time.DateUtils

.

版本:
V1.0, 12-8-25
作者:
yangxin

字段摘要
static org.apache.commons.lang3.time.FastDateFormat DATE_FORMAT
           
static org.apache.commons.lang3.time.FastDateFormat DATEMIN_FORMAT
           
static org.apache.commons.lang3.time.FastDateFormat DATETIME_FORMAT
           
static org.apache.commons.lang3.time.FastDateFormat JDK_TIME_FORMAT
           
static long START_SECOND
           
static Date ZERO
           
 
从类 org.apache.commons.lang3.time.DateUtils 继承的字段
MILLIS_PER_DAY, MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, RANGE_MONTH_MONDAY, RANGE_MONTH_SUNDAY, RANGE_WEEK_CENTER, RANGE_WEEK_MONDAY, RANGE_WEEK_RELATIVE, RANGE_WEEK_SUNDAY, SEMI_MONTH
 
构造方法摘要
DateUtils()
           
 
方法摘要
static String formatTime(Date date, org.apache.commons.lang3.time.FastDateFormat fastDateFormat)
           
static long getCurrentShortSecond()
           
static Date now()
           
static Date parse(Object value)
           
static long parseDuration(String duration)
          Parse a duration
static void registerFormat(String format)
           
static void registerFormat(String format, TimeZone timeZone)
           
static void registerFormat(String format, TimeZone timeZone, Locale locale)
           
static long toNormalSecond(long shortSecond)
           
static long toShortSecond(long timestamp)
           
 
从类 org.apache.commons.lang3.time.DateUtils 继承的方法
addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addWeeks, addYears, ceiling, ceiling, ceiling, getFragmentInDays, getFragmentInDays, getFragmentInHours, getFragmentInHours, getFragmentInMilliseconds, getFragmentInMilliseconds, getFragmentInMinutes, getFragmentInMinutes, getFragmentInSeconds, getFragmentInSeconds, isSameDay, isSameDay, isSameInstant, isSameInstant, isSameLocalTime, iterator, iterator, iterator, parseDate, parseDate, parseDateStrictly, parseDateStrictly, round, round, round, setDays, setHours, setMilliseconds, setMinutes, setMonths, setSeconds, setYears, toCalendar, truncate, truncate, truncate, truncatedCompareTo, truncatedCompareTo, truncatedEquals, truncatedEquals
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

JDK_TIME_FORMAT

public static final org.apache.commons.lang3.time.FastDateFormat JDK_TIME_FORMAT

DATETIME_FORMAT

public static final org.apache.commons.lang3.time.FastDateFormat DATETIME_FORMAT

DATEMIN_FORMAT

public static final org.apache.commons.lang3.time.FastDateFormat DATEMIN_FORMAT

DATE_FORMAT

public static final org.apache.commons.lang3.time.FastDateFormat DATE_FORMAT

ZERO

public static final Date ZERO

START_SECOND

public static final long START_SECOND
另请参见:
常量字段值
构造方法详细信息

DateUtils

public DateUtils()
方法详细信息

registerFormat

public static void registerFormat(String format)

registerFormat

public static void registerFormat(String format,
                                  TimeZone timeZone)

registerFormat

public static void registerFormat(String format,
                                  TimeZone timeZone,
                                  Locale locale)

parse

public static Date parse(Object value)

now

public static Date now()

toShortSecond

public static long toShortSecond(long timestamp)

toNormalSecond

public static long toNormalSecond(long shortSecond)

getCurrentShortSecond

public static long getCurrentShortSecond()

parseDuration

public static long parseDuration(String duration)
Parse a duration

参数:
duration - 3h, 2m, 7s, 500ms
返回:
The number of milliseconds

formatTime

public static String formatTime(Date date,
                                org.apache.commons.lang3.time.FastDateFormat fastDateFormat)


Copyright © 2015–2021 cn.gtmap. All rights reserved.