Skip to content

ParserOptions DSL #1802

@Jolanrensen

Description

@Jolanrensen

Something like:

parserOptions {
    locale = Locale.GERMAN
    dateTime = kotlin {
        formats += LocalDateTime.Formats.ISO
        formats += pattern<LocalTime>("hh:mm")
    }
}

may be more Kotlinlike than

ParserOptions(
    locale = Locale.GERMAN,
    dateTime = DateTimeParserOptions.Kotlin
        .withFormat(LocalDateTime.Formats.ISO)
        .withPattern<LocalTime>("hh:mm"),
)

Follow up for #1777

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIf it touches our API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions