public class DateUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DateUtil.TIMETYPE |
Modifier and Type | Field and Description |
---|---|
static String |
DATE_TIME_FORMAT |
static String |
DATE_TIME_FORMAT_2 |
static org.apache.log4j.Logger |
logger |
Constructor and Description |
---|
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
dateToDateFormatString(Date date) |
static Date |
getDate(Calendar calendar) |
static Date |
getDateFormat(Calendar calendar) |
static String |
getDifference(long date1,
long date2) |
static long |
getDifference(long date1,
long date2,
DateUtil.TIMETYPE timeType) |
static Date |
millisecondsToDate(long milliseconds) |
static Date |
stringToDateFormat(String date) |
static Date |
toDate(Calendar calendar) |
static Date |
toDateFormat(Calendar calendar) |
static String |
toDateFormatToString(Calendar calendar) |
public static org.apache.log4j.Logger logger
public static final String DATE_TIME_FORMAT
public static final String DATE_TIME_FORMAT_2
public static Date millisecondsToDate(long milliseconds)
public static long getDifference(long date1, long date2, DateUtil.TIMETYPE timeType)
public static String getDifference(long date1, long date2)
date1
- date2
- Copyright © 2016. All Rights Reserved.