public final class DateExtensions extends java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
getAllDatePatterns()
Returns a map with all date patterns from the Interface DatePatterns.
|
static java.util.List<java.lang.String> |
getDatePatterns()
Returns a list with all date formats from the interface
DatePatterns |
static int |
getDay(java.util.Date date)
The Method from the Date.getDay is deprecated.
|
static int |
getHours(java.util.Date date)
The Method from the Date.getHours is deprecated.
|
static int |
getMinutes(java.util.Date date)
The Method from the Date.getMinutes is deprecated.
|
static int |
getMonth(java.util.Date date)
The Method from the Date.getMonth is deprecated.
|
static int |
getSeconds(java.util.Date date)
The Method from the Date.getSeconds is deprecated.
|
static int |
getWeekOfYear(java.util.Date date)
The week of the year as an int from the given Date-object.
|
static int |
getYear(java.util.Date date)
The year as int from the Date-object.
|
static java.util.Date |
setDate(java.util.Date dateToSet,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
Returns a new
Date object from the given Date object and sets the given parameters. |
static java.util.Date |
setDate(java.util.Date dateToSet,
int hour,
int minute,
int second,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
Returns a new
Date object from the given Date object and sets the given parameters. |
public static java.util.Map<java.lang.String,java.lang.Object> getAllDatePatterns()
throws java.lang.IllegalAccessException
java.lang.IllegalAccessException - is thrown when an application tries to reflectively create an instancepublic static java.util.List<java.lang.String> getDatePatterns()
throws java.lang.IllegalAccessException
DatePatternsDatePatternsjava.lang.IllegalAccessException - is thrown when an application tries to reflectively create an instancepublic static int getDay(java.util.Date date)
date - The Date-object to get the day.public static int getHours(java.util.Date date)
date - The Date-object to get the hours.public static int getMinutes(java.util.Date date)
date - The Date-object to get the minutes.public static int getMonth(java.util.Date date)
date - The Date-object to get the month.public static int getSeconds(java.util.Date date)
date - The Date-object to get the seconds.public static int getWeekOfYear(java.util.Date date)
date - The Date-object to get the week of the year.public static int getYear(java.util.Date date)
date - The Date-object to get the year.public static java.util.Date setDate(java.util.Date dateToSet,
int year,
int month,
int day,
int hour,
int minute,
int second,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
Date object from the given Date object and sets the given parameters.dateToSet - the date to setyear - the yearmonth - the monthday - the dayhour - the hourminute - the minutesecond - the secondmilliSecond - the mili secondzone - the zonelocale - the a localeDate objectpublic static java.util.Date setDate(java.util.Date dateToSet,
int hour,
int minute,
int second,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
Date object from the given Date object and sets the given parameters.dateToSet - the date to sethour - the hourminute - the minutesecond - the secondmilliSecond - the mili secondzone - the zonelocale - the a locale