public class Tm extends Object
| Constructor and Description |
|---|
Tm(DateTime dt)
Populate year, month, day, hour, min, sec, nano from a DateTime
|
Tm(DateTime dt,
TimeZone tz)
Constructor
|
Tm(long millis)
Populate year, month, day, hour, min, sec, nano
|
Tm(long millis,
TimeZone tz)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static long |
calcTime(int year,
int month,
int day)
Determine "time" in milliseconds since epoch, UTC, as of the entered local time.
|
static long |
calcTime(int year,
int month,
int day,
int hour,
int min,
int sec,
int milli)
Determine "time" in milliseconds since epoch, UTC, as of the entered local time.
|
static long |
calcTime(int year,
int month,
int day,
int hour,
int min,
int sec,
int milli,
TimeZone tz)
Determine "time" in milliseconds since epoch, UTC, as of the given time zone provided.
|
static int |
calcWeekday(long millis,
TimeZone timeZone)
Return numeric day of week, usually Sun=1, Mon=2, ...
|
int |
getDay()
Returns day of month between 1 and 31.
|
int |
getHour()
Returns hour of day between 0 and 23.
|
int |
getMillisecond()
Returns millisecond fraction of second between 0 and 999999.
|
int |
getMinute()
Returns minute of hour between 0 and 59.
|
int |
getMonth()
Returns month between 1 and 12.
|
int |
getNanosecond()
Returns nanosecond fraction of second between 0 and 999999999.
|
int |
getSecond()
Returns second of minute between 0 and 59.
|
int |
getWeekday()
Returns weekday between 1 and 7
|
int |
getYear() |
public Tm(DateTime dt)
dt - DateTime objectpublic Tm(DateTime dt, TimeZone tz)
dt - Populate year, month, day, hour, min, sec, nano from a DateTimetz - Assert a time zone under which those values are represented.public Tm(long millis)
millis - Date/Time in UTC assuming the default time zone.public Tm(long millis, TimeZone tz)
millis - Millis since epochtz - TimeZone represented by the Tmpublic static int calcWeekday(long millis,
TimeZone timeZone)
millis - milliseconds since epochtimeZone - TimeZone under which Tm will be representedpublic static long calcTime(int year,
int month,
int day)
year - calendar yearmonth - calendar monthday - calendar daypublic static long calcTime(int year,
int month,
int day,
int hour,
int min,
int sec,
int milli)
year - calendar yearmonth - calendar monthday - calendar dayhour - hour of daymin - minute of hoursec - secondsmilli - millisecondspublic static long calcTime(int year,
int month,
int day,
int hour,
int min,
int sec,
int milli,
TimeZone tz)
year - calendar yearmonth - calendar monthday - calendar dayhour - hour of daymin - minute of hoursec - secondsmilli - milliseconstz - time zone in which the date parts are givenpublic int getYear()
public int getMonth()
public int getDay()
public int getHour()
public int getMinute()
public int getSecond()
public int getMillisecond()
public int getNanosecond()
public int getWeekday()
Copyright © 2014. All Rights Reserved.