Class ISOPeriodFormat
- java.lang.Object
-
- org.joda.time.format.ISOPeriodFormat
-
public class ISOPeriodFormat extends java.lang.Object
Factory that creates instances of PeriodFormatter for the ISO8601 standard.Period formatting is performed by the
PeriodFormatter
class. Three classes provide factory methods to create formatters, and this is one. The others arePeriodFormat
andPeriodFormatterBuilder
.ISOPeriodFormat is thread-safe and immutable, and the formatters it returns are as well.
- Since:
- 1.0
- See Also:
PeriodFormat
,PeriodFormatterBuilder
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ISOPeriodFormat()
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
cStandard
private static PeriodFormatter cStandard
Cache of standard format.
-
cAlternate
private static PeriodFormatter cAlternate
Cache of alternate months format.
-
cAlternateExtended
private static PeriodFormatter cAlternateExtended
Cache of alternate extended months format.
-
cAlternateWithWeeks
private static PeriodFormatter cAlternateWithWeeks
Cache of alternate weeks format.
-
cAlternateExtendedWihWeeks
private static PeriodFormatter cAlternateExtendedWihWeeks
Cache of alternate extended weeks format.
-
-
Method Detail
-
standard
public static PeriodFormatter 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
public static PeriodFormatter 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
public static PeriodFormatter 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
public static PeriodFormatter 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
public static PeriodFormatter 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
-
-