MrzDate

data class MrzDate(val rawYear: String, val rawMonth: String, val rawDay: String, val computedYear: Int? = null, val computedDate: LocalDate? = null, val inferenceMethod: MrzDateInferenceMethod = MrzDateInferenceMethod.RAW_ONLY, val componentsFormCalendarDate: Boolean? = null)

An MRZ date: the printed year, month, and day, plus an inferred full date.

toString() shows no document values; they are in the properties.

Since

0.1.0

Constructors

Link copied to clipboard
constructor(rawYear: String, rawMonth: String, rawDay: String, computedYear: Int? = null, computedDate: LocalDate? = null, inferenceMethod: MrzDateInferenceMethod = MrzDateInferenceMethod.RAW_ONLY, componentsFormCalendarDate: Boolean? = null)

Types

Link copied to clipboard
object Companion

Factories that parse printed date components.

Properties

Link copied to clipboard

true if the components form a real date in the 2000s or the 1900s, false if they form none, null if they are not two-digit numbers. Default: null.

Link copied to clipboard
val computedDate: LocalDate?
Link copied to clipboard

The four-digit year chosen by century inference. null if inferenceMethod is MrzDateInferenceMethod.RAW_ONLY.

Link copied to clipboard
Link copied to clipboard

The two day characters as printed.

Link copied to clipboard

The two month characters as printed.

Link copied to clipboard

The two year characters as printed.

Functions

Link copied to clipboard
open override fun toString(): String

The inference method and whether the parts form a real date; never a document value.