public class DateTime extends Object
Modifier and Type | Field | Description |
---|---|---|
static long |
CHRONON_OF_DAY |
|
static long |
CHRONON_OF_HOUR |
|
static long |
CHRONON_OF_MINUTE |
|
static long |
CHRONON_OF_SECOND |
|
static int |
DAY_FIELD_INDEX |
|
static long[] |
DAYS_OF_MONTH_LEAP |
|
static long[] |
DAYS_OF_MONTH_ORDI |
|
static int[] |
FIELD_MAXS |
|
static int[] |
FIELD_MINS |
Minimum feasible value of each field
|
static int |
HOUR_FIELD_INDEX |
|
static int |
MILLISECOND_FIELD_INDEX |
|
static int |
MINUTE_FIELD_INDEX |
|
static int |
MONTH_FIELD_INDEX |
|
static int |
TIME_DEFAULT_DAY |
|
static int |
TIME_DEFAULT_MONTH |
|
static int |
TIME_DEFAULT_YEAR |
|
static int |
TIMEZONE_HOUR_MAX |
|
static int |
TIMEZONE_HOUR_MIN |
|
static byte |
TIMEZONE_HOUR_NULL |
|
static int |
TIMEZONE_MINUTE_MAX |
|
static int |
TIMEZONE_MINUTE_MIN |
|
static byte |
TIMEZONE_MINUTE_NULL |
|
static int |
YEAR_FIELD_INDEX |
Constructor | Description |
---|---|
DateTime() |
Modifier and Type | Method | Description |
---|---|---|
static void |
adjustDateTimeToTimezone(ITimezone timezonep,
long timezone,
DataOutput dOut) |
|
static void |
getUtcTimezoneDateTime(ITimezone timezonep,
ITimezone defaultTimezonep,
DataOutput dOut) |
|
static boolean |
isLeapYear(long year) |
Check whether a given year is a leap year.
|
static void |
normalizeDateTime(long yearMonth,
long dayTime,
long timezoneHour,
long timezoneMinute,
DataOutput dOut) |
Return a normalized time.
|
static boolean |
valid(long year,
long month,
long day,
long hour,
long minute,
long millisecond,
long timezoneHour,
long timezoneMinute) |
Check whether a given year is a leap year.
|
public static final long[] DAYS_OF_MONTH_ORDI
public static final long[] DAYS_OF_MONTH_LEAP
public static final long CHRONON_OF_SECOND
public static final long CHRONON_OF_MINUTE
public static final long CHRONON_OF_HOUR
public static final long CHRONON_OF_DAY
public static final int[] FIELD_MINS
public static final int[] FIELD_MAXS
public static final int TIMEZONE_HOUR_MIN
public static final int TIMEZONE_HOUR_MAX
public static final int TIMEZONE_MINUTE_MIN
public static final int TIMEZONE_MINUTE_MAX
public static final byte TIMEZONE_HOUR_NULL
public static final byte TIMEZONE_MINUTE_NULL
public static final int YEAR_FIELD_INDEX
public static final int MONTH_FIELD_INDEX
public static final int DAY_FIELD_INDEX
public static final int HOUR_FIELD_INDEX
public static final int MINUTE_FIELD_INDEX
public static final int MILLISECOND_FIELD_INDEX
public static final int TIME_DEFAULT_YEAR
public static final int TIME_DEFAULT_MONTH
public static final int TIME_DEFAULT_DAY
public static boolean isLeapYear(long year)
year
- A long for year.public static boolean valid(long year, long month, long day, long hour, long minute, long millisecond, long timezoneHour, long timezoneMinute)
year
- yearmonth
- monthday
- dayhour
- hourminute
- minutemillisecond
- millisecondtimezoneHour
- timezoneHourtimezoneMinute
- timezoneMinutepublic static void normalizeDateTime(long yearMonth, long dayTime, long timezoneHour, long timezoneMinute, DataOutput dOut) throws IOException
yearMonth
- MonthsdayTime
- TimetimezoneHour
- timezoneHourtimezoneMinute
- timezoneMinutedOut
- Data outIOException
- Could not write result.public static void getUtcTimezoneDateTime(ITimezone timezonep, ITimezone defaultTimezonep, DataOutput dOut) throws IOException
IOException
public static void adjustDateTimeToTimezone(ITimezone timezonep, long timezone, DataOutput dOut) throws IOException
IOException
Copyright © 2019 Apache Software Foundation. All rights reserved.