PeriodStyle

A standard set of Period units.

Author

Eddú Meléndez

Edson Chávez

Valentine Wu

Since

2.3.0

See also

Entries

Link copied to clipboard

Simple formatting, for example '1d'.

Link copied to clipboard

ISO-8601 formatting.

Functions

Link copied to clipboard
open fun detect(value: String): PeriodStyle
Detect the style from the given source value.
Link copied to clipboard
open fun detectAndParse(value: String): Period
open fun detectAndParse(value: String, unit: ChronoUnit): Period
Detect the style then parse the value to return a period.
Link copied to clipboard
open fun parse(value: String): Period
Parse the given value to a Period.
abstract fun parse(value: String, unit: ChronoUnit): Period
Parse the given value to a period.
Link copied to clipboard
open fun print(value: Period): String
Print the specified period.
abstract fun print(value: Period, unit: ChronoUnit): String
Print the specified period using the given unit.
Link copied to clipboard
open fun valueOf(name: String): PeriodStyle

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
open fun values(): Array<PeriodStyle>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.