optional

abstract fun optional(builder: DateTimeParserBuilder.() -> Unit)

Make parsing optional within a block.

If any of the parsers defined within builder fail, the parse result will be reset to its state before the block started and parsing will continue on, assuming there are additional parsers remaining.

Parameters

builder

define the parsers that should be considered 'optional'