Date Result#

Defined in package

class DateResult

Added in version 6.5.0

A date extracted from a personal identification document. May represent either a full date (day, month, year) or just a month and a year.


ID Capture API is still in beta and may change in future versions of Scandit Data Capture SDK.

DateResult(@NonNull Integer day,
        int month,
        int year)

Added in version 6.5.0

Constructs a new instance of this class from an optional day, a month and a year.

@NonNull Integer getDay()

Added in version 6.5.0

The extracted day of the month or null if this result represents a month and a year only.

int getMonth()

Added in version 6.5.0

A number from 1 to 12 representing the extracted month, where 1 represents January, 2 - February and so on.

int getYear()

Added in version 6.5.0

The extracted year.

@NonNull Date toDate()

Added in version 6.5.0

Converts this result to a Date. The timezone is set to UTC, the time to midnight. If the day information is missing, it is set to the 1st day of the month.

boolean equals(@Nullable Object obj)

Added in version 6.5.0

Indicates whether some other object is equal to this one.

int hashCode()

Added in version 6.5.0

Returns a hash code value for the object.