public class DateTimeHelper
extends java.lang.Object
Constructor and Description |
---|
DateTimeHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatDate(java.util.Date date)
Formats the specified date.
|
static java.lang.String |
formatTime(long timeStamp)
Formats the specified time stamp.
|
static java.util.Date |
getDateForMidnight(java.util.Date date)
Returns the midnight date for the specified date.
|
static java.util.Date |
getDateForMidnight(long timeStamp)
Returns the midnight date for the specified time stamp.
|
static java.lang.String |
getFormatPattern()
Returns the current format pattern.
|
static void |
setFormatPattern(java.lang.String formatPattern)
Sets the new current format pattern.
|
public static java.lang.String getFormatPattern()
public static void setFormatPattern(java.lang.String formatPattern)
formatPattern
- the new format patternpublic static java.lang.String formatTime(long timeStamp)
timeStamp
- the time stampsetFormatPattern(String)
public static java.lang.String formatDate(java.util.Date date)
date
- the datepublic static java.util.Date getDateForMidnight(long timeStamp)
timeStamp
- the time stamppublic static java.util.Date getDateForMidnight(java.util.Date date)
date
- the date