//core/io.islandtime.parser/DateTimeParserBuilder/decimalNumber
decimalNumber¶
common
abstract fun decimalNumber(wholeLength: IntRange = 1..19, fractionLength: IntRange = 0..9, fractionScale: Int = 9, builder: DecimalNumberParserBuilder.() -> 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¶
common
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 |