//core/io.islandtime.parser/DateTimeParserBuilder
DateTimeParserBuilder¶
common
interface DateTimeParserBuilder
Functions¶
Name | Summary |
---|---|
amPm | common fun DateTimeParserBuilder.amPm() Parse the AM or PM of the day from its textual representation. |
anyOf | common abstract fun anyOf(vararg childParsers: DateTimeParser) Try each of the parsers defined by childParsers until one succeeds. If none succeed, parsing is considered to have failed. common abstract fun anyOf(vararg builders: DateTimeParserBuilder.() -> Unit) Try each of the parsers defined by builders until one succeeds. If none succeed, parsing is considered to have failed. |
caseInsensitive | common abstract fun caseInsensitive(builder: DateTimeParserBuilder.() -> Unit) Force parsing to be case-insensitive within this block. |
caseSensitive | common abstract fun caseSensitive(builder: DateTimeParserBuilder.() -> Unit) Force parsing to be case-sensitive within this block. |
childParser | common abstract fun childParser(childParser: DateTimeParser) Use a parser that has been defined outside of this builder. |
dayOfMonth | common inline fun DateTimeParserBuilder.dayOfMonth(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a day of the month value with a fixed number of digits. common inline fun DateTimeParserBuilder.dayOfMonth(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a day of the month value with a variable number of digits. |
dayOfWeekNumber | common inline fun DateTimeParserBuilder.dayOfWeekNumber(length: Int = 1, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a day of week number with a fixed number of digits. |
dayOfYear | common inline fun DateTimeParserBuilder.dayOfYear(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a day of the year value with a fixed number of digits. common inline fun DateTimeParserBuilder.dayOfYear(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a day of the year value with a variable number of digits. |
decimalNumber | common abstract fun decimalNumber(wholeLength: IntRange = 1..19, fractionLength: IntRange = 0..9, fractionScale: Int = 9, builder: DecimalNumberParserBuilder.() -> Unit = {}) Parse a decimal number. |
durationOfFractionalSeconds | common inline fun DateTimeParserBuilder.durationOfFractionalSeconds(wholeLength: IntRange = 1..19, fractionLength: IntRange = 0..9, fractionScale: Int = 9, crossinline builder: DecimalNumberParserBuilder.() -> Unit = {}) Parse a duration of fractional seconds. |
durationOfHours | common inline fun DateTimeParserBuilder.durationOfHours(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a duration of whole hours. |
durationOfMinutes | common inline fun DateTimeParserBuilder.durationOfMinutes(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a duration of whole minutes. |
durationOfSeconds | common inline fun DateTimeParserBuilder.durationOfSeconds(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a duration of whole seconds. |
era | common fun DateTimeParserBuilder.era(style: TextStyle) Parse an era from its textual representation in a specific style. common fun DateTimeParserBuilder.era(styles: Set<TextStyle>) Parse an era from its textual representation in any of the specified styles. |
fractionalSecondOfMinute | common inline fun DateTimeParserBuilder.fractionalSecondOfMinute(wholeLength: Int, fractionLength: IntRange = 0..9, fractionScale: Int = 9, crossinline builder: DecimalNumberParserBuilder.() -> Unit = {}) Parse a fractional second of the minute with a fixed number of characters representing the whole second. common inline fun DateTimeParserBuilder.fractionalSecondOfMinute(wholeLength: IntRange = 1..2, fractionLength: IntRange = 0..9, fractionScale: Int = 9, crossinline builder: DecimalNumberParserBuilder.() -> Unit = {}) Parse a fractional second of the minute. |
hourOfDay | common inline fun DateTimeParserBuilder.hourOfDay(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse an hour of the day with a fixed number of digits. common inline fun DateTimeParserBuilder.hourOfDay(length: IntRange = 1..2, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse an hour of the day with a variable number of digits. |
literal | common abstract fun literal(char: Char, builder: LiteralParserBuilder.() -> Unit = {}) Parse a Char literal. common abstract fun literal(string: String, builder: LiteralParserBuilder.() -> Unit = {}) Parse a String literal. |
localizedDayOfWeek | common fun DateTimeParserBuilder.localizedDayOfWeek(style: TextStyle) Parse a day of the week from its textual representation in a specific style. common fun DateTimeParserBuilder.localizedDayOfWeek(styles: Set<TextStyle>) Parse a day of the week from its textual representation in any of the specified styles. |
localizedMonth | common fun DateTimeParserBuilder.localizedMonth(style: TextStyle) Parse a month from its textual representation in a specific style. common fun DateTimeParserBuilder.localizedMonth(styles: Set<TextStyle>) Parse a month from its textual representation in any of the specified styles. |
localizedText | common abstract fun localizedText(field: DateTimeField, styles: Set<TextStyle>) Parse localized text associated with a particular DateTimeField in any of the specified styles. If successful, the field's value will be populated. If no text is known for the field or a match can't be found, the parsing operation will return an error. |
minuteOfHour | common inline fun DateTimeParserBuilder.minuteOfHour(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a minute of the hour with a fixed number of digits. common inline fun DateTimeParserBuilder.minuteOfHour(length: IntRange = 1..2, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a minute of the hour with a variable number of digits. |
monthNumber | common inline fun DateTimeParserBuilder.monthNumber(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a month of year number with a fixed number of digits. common inline fun DateTimeParserBuilder.monthNumber(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a month of year value with a variable number of digits. |
optional | common abstract fun optional(builder: DateTimeParserBuilder.() -> Unit) Make parsing optional within a block. |
periodOfDays | common inline fun DateTimeParserBuilder.periodOfDays(length: IntRange = 1..10, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a period of whole days. |
periodOfMonths | common inline fun DateTimeParserBuilder.periodOfMonths(length: IntRange = 1..10, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a period of whole months. |
periodOfWeeks | common inline fun DateTimeParserBuilder.periodOfWeeks(length: IntRange = 1..10, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a period of whole weeks. |
periodOfYears | common inline fun DateTimeParserBuilder.periodOfYears(length: IntRange = 1..10, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a period of whole years. |
periodSign | common fun DateTimeParserBuilder.periodSign() Parses a number's sign and populates DateTimeField.PERIOD_SIGN with -1L , if negative or 1L , if positive. |
secondOfMinute | common inline fun DateTimeParserBuilder.secondOfMinute(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a second of the minute with a fixed number of digits. common inline fun DateTimeParserBuilder.secondOfMinute(length: IntRange = 1..2, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a second of the minute with a variable number of digits. |
sign | common abstract fun sign(builder: SignParserBuilder.() -> Unit = {}) Parse a character indicating the sign of a number. |
string | common abstract fun string(length: IntRange = IntRange.EMPTY, builder: StringParserBuilder.() -> Unit) Parse a variable length string. |
timeZoneId | common fun DateTimeParserBuilder.timeZoneId() Parse a time zone region ID. |
unaryPlus | common open operator fun Char.unaryPlus() Parse a Char literal. common open operator fun String.unaryPlus() Parse a String literal. |
unboundedDesignator | common fun DateTimeParserBuilder.unboundedDesignator() Parses the string ".." and populates DateTimeField.IS_UNBOUNDED with 1L . |
utcDesignator | common fun DateTimeParserBuilder.utcDesignator() Parses the character 'Z' and populates DateTimeField.UTC_OFFSET_TOTAL_SECONDS with 0L . |
utcOffsetHours | common inline fun DateTimeParserBuilder.utcOffsetHours(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) |
utcOffsetMinutes | common inline fun DateTimeParserBuilder.utcOffsetMinutes(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) |
utcOffsetSeconds | common inline fun DateTimeParserBuilder.utcOffsetSeconds(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) |
utcOffsetSign | common fun DateTimeParserBuilder.utcOffsetSign() Parses a number's sign and populates DateTimeField.UTC_OFFSET_SIGN with -1L , if negative or 1L , if positive. |
wholeNumber | common abstract fun wholeNumber(length: Int, builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a whole number of fixed length. common abstract fun wholeNumber(length: IntRange = 1..19, builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a whole number of variable length. |
year | common inline fun DateTimeParserBuilder.year(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a year with a fixed number of digits. common inline fun DateTimeParserBuilder.year(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a year with a variable number of digits. |
yearOfEra | common inline fun DateTimeParserBuilder.yearOfEra(length: Int, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a year of era with a fixed number of digits. common inline fun DateTimeParserBuilder.yearOfEra(length: IntRange = 1..19, crossinline builder: WholeNumberParserBuilder.() -> Unit = {}) Parse a year of era with a variable number of digits. |