public class DateUtils extends Object implements DatePatterns
DD_MMM_YY, DOT_DD_MM, DOT_DD_MM_YY, DOT_DD_MM_YYYY, DOT_DD_MM_YYYY_HH_MM_SS, DOT_YYYY_MM_DD_HH_MM_SS, EEE_MMM_DD_HH_MM_SS_Z_YYYY, EEEE_MMM_DD_YYYY, LHH_MM_SS, UHH_MM, UHH_MM_SS, YYYY_MM_DD, YYYY_MM_DD_HH_MM_SS, YYYY_MM_DD_HH_MM_SS_S, YYYY_MM_DD_T_HH_MM_SS, YYYYMMDDHHMMSS| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getAllDateFormats()
Returns a list with all dateformats from the Interface DateFormats.
|
static Map<String,Object> |
getAllDatePatterns()
Returns a map with all datepatterns from the Interface DatePatterns.
|
static int |
getDay(Date date)
The Method from the Date.getDay is deprecated.
|
static int |
getHours(Date date)
The Method from the Date.getHours is deprecated.
|
static int |
getMinutes(Date date)
The Method from the Date.getMinutes is deprecated.
|
static int |
getMonth(Date date)
The Method from the Date.getMonth is deprecated.
|
static int |
getSeconds(Date date)
The Method from the Date.getSeconds is deprecated.
|
static int |
getWeekOfYear(Date date)
The week of the year as an int from the given Date-object.
|
static int |
getYear(Date date)
The year as int from the Date-object.
|
static Date |
setDate(Date dateToSet,
int hours,
int minutes,
int seconds,
int milisec,
TimeZone zone,
Locale locale)
Returns a new
Date object from the given Date object and sets the given parameters. |
public static List<String> getAllDateFormats()
public static Map<String,Object> getAllDatePatterns()
public static int getDay(Date date)
date - The Date-object to get the day.public static int getHours(Date date)
date - The Date-object to get the hours.public static int getMinutes(Date date)
date - The Date-object to get the minutes.public static int getMonth(Date date)
date - The Date-object to get the month.public static int getSeconds(Date date)
date - The Date-object to get the seconds.public static int getYear(Date date)
date - The Date-object to get the year.public static int getWeekOfYear(Date date)
date - The Date-object to get the week of the year.public static Date setDate(Date dateToSet, int hours, int minutes, int seconds, int milisec, TimeZone zone, Locale locale)
Date object from the given Date object and sets the given parameters.dateToSet - the date to sethours - the hoursminutes - the minutesseconds - the secondsmilisec - the miliseczone - the zonelocale - the a localeCopyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.