Class ISOPeriodFormat
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.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static PeriodFormatterCache of alternate months format.private static PeriodFormatterCache of alternate extended months format.private static PeriodFormatterCache of alternate extended weeks format.private static PeriodFormatterCache of alternate weeks format.private static PeriodFormatterCache of standard format. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PeriodFormatterThe alternate ISO format, PyyyymmddThhmmss, which excludes weeks.static PeriodFormatterThe alternate ISO format, Pyyyy-mm-ddThh:mm:ss, which excludes weeks.static PeriodFormatterThe alternate ISO format, Pyyyy-Www-ddThh:mm:ss, which excludes months.static PeriodFormatterThe alternate ISO format, PyyyyWwwddThhmmss, which excludes months.static PeriodFormatterstandard()The standard ISO format - PyYmMwWdDThHmMsS.
-
Field Details
-
cStandard
Cache of standard format. -
cAlternate
Cache of alternate months format. -
cAlternateExtended
Cache of alternate extended months format. -
cAlternateWithWeeks
Cache of alternate weeks format. -
cAlternateExtendedWihWeeks
Cache of alternate extended weeks format.
-
-
Constructor Details
-
ISOPeriodFormat
protected ISOPeriodFormat()Constructor.- Since:
- 1.1 (previously private)
-
-
Method Details
-
standard
The standard ISO format - PyYmMwWdDThHmMsS. Milliseconds are not output. Note that the ISO8601 standard actually indicates weeks should not be shown if any other field is present and vice versa.- Returns:
- the formatter
-
alternate
The alternate ISO format, PyyyymmddThhmmss, which excludes weeks.Even if weeks are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
- Returns:
- the formatter
-
alternateExtended
The alternate ISO format, Pyyyy-mm-ddThh:mm:ss, which excludes weeks.Even if weeks are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
- Returns:
- the formatter
-
alternateWithWeeks
The alternate ISO format, PyyyyWwwddThhmmss, which excludes months.Even if months are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
- Returns:
- the formatter
-
alternateExtendedWithWeeks
The alternate ISO format, Pyyyy-Www-ddThh:mm:ss, which excludes months.Even if months are present in the period, they are not output. Fractional seconds (milliseconds) will appear if required.
- Returns:
- the formatter
-