public class ISOPeriodFormat
extends java.lang.Object
Period formatting is performed by the PeriodFormatter
class.
Three classes provide factory methods to create formatters, and this is one.
The others are PeriodFormat
and PeriodFormatterBuilder
.
ISOPeriodFormat is thread-safe and immutable, and the formatters it returns are as well.
PeriodFormat
,
PeriodFormatterBuilder
Modifier and Type | Field and Description |
---|---|
private static PeriodFormatter |
cAlternate
Cache of alternate months format.
|
private static PeriodFormatter |
cAlternateExtended
Cache of alternate extended months format.
|
private static PeriodFormatter |
cAlternateExtendedWihWeeks
Cache of alternate extended weeks format.
|
private static PeriodFormatter |
cAlternateWithWeeks
Cache of alternate weeks format.
|
private static PeriodFormatter |
cStandard
Cache of standard format.
|
Modifier | Constructor and Description |
---|---|
protected |
ISOPeriodFormat()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static PeriodFormatter |
alternate()
The alternate ISO format, PyyyymmddThhmmss, which excludes weeks.
|
static PeriodFormatter |
alternateExtended()
The alternate ISO format, Pyyyy-mm-ddThh:mm:ss, which excludes weeks.
|
static PeriodFormatter |
alternateExtendedWithWeeks()
The alternate ISO format, Pyyyy-Www-ddThh:mm:ss, which excludes months.
|
static PeriodFormatter |
alternateWithWeeks()
The alternate ISO format, PyyyyWwwddThhmmss, which excludes months.
|
static PeriodFormatter |
standard()
The standard ISO format - PyYmMwWdDThHmMsS.
|
private static PeriodFormatter cStandard
private static PeriodFormatter cAlternate
private static PeriodFormatter cAlternateExtended
private static PeriodFormatter cAlternateWithWeeks
private static PeriodFormatter cAlternateExtendedWihWeeks
protected ISOPeriodFormat()
public static PeriodFormatter standard()
public static PeriodFormatter alternate()
Even if weeks are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
public static PeriodFormatter alternateExtended()
Even if weeks are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
public static PeriodFormatter alternateWithWeeks()
Even if months are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
public static PeriodFormatter alternateExtendedWithWeeks()
Even if months are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.