- java.lang.Object
-
- org.threeten.extra.PackedFields
-
public final class PackedFields extends Object
Temporal fields based on a packed representation.This provides three fields that use a packed integer representation for dates and times.
-
-
Field Summary
Fields Modifier and Type Field Description static TemporalField
PACKED_DATE
Packed date field.static TemporalField
PACKED_HOUR_MIN
Packed hour-minute time field.static TemporalField
PACKED_TIME
Packed hour-minute-second time field.
-
-
-
Field Detail
-
PACKED_DATE
public static final TemporalField PACKED_DATE
Packed date field.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.
-
PACKED_HOUR_MIN
public static final TemporalField PACKED_HOUR_MIN
Packed hour-minute time field.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.
-
PACKED_TIME
public static final TemporalField PACKED_TIME
Packed hour-minute-second time field.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.
-
-