Package one.microstream.time
Class XTime
- java.lang.Object
-
- one.microstream.time.XTime
-
public final class XTime extends Object
-
-
Constructor Summary
Constructors Constructor Description XTime()
-
Method Summary
Modifier and Type Method Description static GregorianCalendar
asGregCal(long timestamp)
static GregorianCalendar
asGregCal(Date date)
static int
currentYear()
static Date
date(int year, int month, int day)
static Date
now()
Short cut fornew Date(System.currentTimeMillis())
.static TimeSpan
TimeSpan(long time)
static Date
timestamp(int year, int month, int day)
static Date
timestamp(int year, int month, int day, int hour, int minute, int second)
static Date
timestamp(int year, int month, int day, int hour, int minute, int second, int milliseconds)
-
-
-
Method Detail
-
now
public static final Date now()
Short cut fornew Date(System.currentTimeMillis())
. Returns a newDate
instance representing the current time in the currentTimeZone
and for the currentLocale
.- Returns:
- right now!
-
timestamp
public static final Date timestamp(int year, int month, int day, int hour, int minute, int second, int milliseconds)
-
timestamp
public static final Date timestamp(int year, int month, int day, int hour, int minute, int second)
-
date
public static final Date date(int year, int month, int day)
-
timestamp
public static final Date timestamp(int year, int month, int day)
-
TimeSpan
public static final TimeSpan TimeSpan(long time)
-
asGregCal
public static final GregorianCalendar asGregCal(Date date)
-
asGregCal
public static final GregorianCalendar asGregCal(long timestamp)
-
currentYear
public static final int currentYear()
-
-