public class DateTime extends Time2
Time2
with second resolution and the origin at
2000-01-01. For times before the origin, TimeIndex.asOffset()
will return
negative values. The domain label is datetime.
This time corresponds to Unix time, except for the "epoch", 2000-01-01 instead of 1970-01-01.
Modifier and Type | Field and Description |
---|---|
static TimeDomain |
DOMAIN
A constant holding the domain.
|
static String |
LABEL
A constant holding the domain label.
|
Constructor and Description |
---|
DateTime(long year,
int month,
int day,
int hour,
int min,
int sec)
Construct a
datetimetime from the given time components. |
DateTime(String date)
Construct a
datetimetime from a string. |
DateTime(TimeIndex time)
Construct a
datetimetime from another time object. |
public static final String LABEL
public static final TimeDomain DOMAIN
public DateTime(TimeIndex time) throws T2Exception
datetimetime from another time object.
time
- a non-null time in the domain datetime
T2Exception
public DateTime(String date) throws T2Exception
datetimetime from a string.
date
- a non-null stringT2Exception
public DateTime(long year, int month, int day, int hour, int min, int sec) throws T2Exception
datetimetime from the given time components.
year
- a non-negative numbermonth
- a number in [1-12]day
- a number between 1 and the last day of the monthhour
- a number in [0-23]min
- a number in [0-59]sec
- a number in [0-59]T2Exception
Copyright © 2017. All rights reserved.