public final class PackedFields
extends java.lang.Object
This provides three fields that use a packed integer representation for dates and times.
Modifier and Type | Field | Description |
---|---|---|
static java.time.temporal.TemporalField |
PACKED_DATE |
Packed date field.
|
static java.time.temporal.TemporalField |
PACKED_HOUR_MIN |
Packed hour-minute time field.
|
static java.time.temporal.TemporalField |
PACKED_TIME |
Packed hour-minute-second time field.
|
public static final java.time.temporal.TemporalField PACKED_DATE
This returns the date as a single integer value. Only dates from year 1000 to year 9999 are supported. The output is always an 8 digit integer. For example, the date 2015-12-03 is packed to the integer 20151203.
This field has invalid values within the range of value values. For example, 20121301 is invalid as it implies month 13.
When parsing in lenient mode, invalid dates will be accepted. For example, 20121301 will result in 2013-01-01.
public static final java.time.temporal.TemporalField PACKED_HOUR_MIN
This returns the time as a single integer value. The output is an integer from 0 to 2359. For example, the date 11:30 is packed to the integer 1130.
This field has invalid values within the range of value values. For example, 1073 is invalid as it implies the minute is 73.
When parsing in lenient mode, invalid times will be accepted. For example, 1073 will result in 11:13.
public static final java.time.temporal.TemporalField PACKED_TIME
This returns the time as a single integer value. The output is an integer from 0 to 235959. For example, the date 11:30:52 is packed to the integer 113052.
This field has invalid values within the range of value values. For example, 107310 is invalid as it implies the minute is 73.
When parsing in lenient mode, invalid times will be accepted. For example, 107310 will result in 11:13:10.
Copyright © 2010–2018 ThreeTen.org. All rights reserved.