public final class CreateDateExtensions 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.Date |
inPast(java.util.Date from,
int millis)
Creates a date in past from the given Date back in milliseconds.
|
static java.util.Date |
newDate(int year,
int month,
int day)
Creates a new Date object from the given values.
|
static java.util.Date |
newDate(int year,
int month,
int day,
int hour,
int min,
int sec)
Creates a new Date object from the given values.
|
static java.util.Date |
newDate(int year,
int month,
int day,
int hour,
int minute,
int seconds,
int milliSecond)
Creates a new Date object from the given values.
|
static java.util.Date |
newDate(int year,
int month,
int day,
int hour,
int minute,
int seconds,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
Creates a new Date object from the given values.
|
static java.util.Date |
newDate(long time)
Creates a date from the given long value.
|
static java.util.Date |
newRandomDate(java.util.Date from)
Creates the random date.
|
static java.util.Date |
now()
Creates a date from the current system time.
|
public static java.util.Date inPast(java.util.Date from,
int millis)
from - the frommillis - the millispublic static java.util.Date newDate(int year,
int month,
int day)
year - The year.month - The month.day - The day.public static java.util.Date newDate(int year,
int month,
int day,
int hour,
int min,
int sec)
year - The year.month - The month.day - The day.hour - The hour.min - The minute.sec - The second.public static java.util.Date newDate(int year,
int month,
int day,
int hour,
int minute,
int seconds,
int milliSecond)
year - The year.month - The month.day - The day.hour - The hour.minute - The minute.seconds - The second.milliSecond - The millisecond.public static java.util.Date newDate(int year,
int month,
int day,
int hour,
int minute,
int seconds,
int milliSecond,
java.util.TimeZone zone,
java.util.Locale locale)
year - The year.month - The month.day - The day.hour - The hour.minute - The minute.seconds - The second.milliSecond - The millisecond.zone - the zonelocale - the localepublic static java.util.Date newDate(long time)
time - the timepublic static java.util.Date newRandomDate(java.util.Date from)
from - the frompublic static java.util.Date now()