DurationParser

Object in charge of parsing strings into DateTimePeriods, using translated locale-aware units.

Functions

Link copied to clipboard
fun charValid(char: Char, locale: Locale): Boolean

Check whether the given character is a valid duration unit character.

Link copied to clipboard
open override fun getKoin(): Koin

Get the associated Koin instance.

Link copied to clipboard
fun parse(input: String, locale: Locale): DateTimePeriod

Parse the provided string to a DateTimePeriod object, using the strings provided by the given Locale.