core / io.islandtime.parser / DateTimeParserBuilder / decimalNumber

decimalNumber

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) abstract fun decimalNumber(wholeLength: IntRange = 1..19, fractionLength: IntRange = 0..9, fractionScale: Int = 9, builder: DecimalNumberParserBuilder.() -> Unit = {}): Unit

Parse a decimal number.

If the minimum fractionLength is zero, a decimal separator isn't required.

The characters associated with a decimal separator are controlled by the DateTimeParserSettings. By default, this is '.' or ',' as specified in ISO-8601. The characters may be overridden by using a different NumberStyle.

Parameters

wholeLength - the number of digits to parse from the whole part, excluding sign

fractionLength - the number of digits to parse from the fraction part

fractionScale - the number of digits to normalize the fraction to -- by default 9, indicating nanoseconds

builder - configure parser behavior

See Also

NumberStyle