MBIDateParser


@interface MBIDateParser : MBIParser <NSCopying>

MBIDateParser that can extract date from OCR result.

  • Undocumented

    Declaration

    Objective-C

    MB_INIT

    Swift

    init()
  • Date parser result

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) MBIDateParserResult *_Nonnull result;

    Swift

    var result: MBIDateParserResult { get }
  • Specifies the date formats that will be accepted by date parser. By default, all available numeric date formats from MBIDateFormat enum will be accepted (all formats in which month is numeric). Array of expected date formats, if it is nil or empty, date formats will be set to default value.

    Declaration

    Objective-C

    - (void)setDateFormats:(nonnull MBIDateFormatArray *)dateFormats;

    Swift

    func setDateFormats(_ dateFormats: [NSNumber])
  • Specifies the date separator characters between date parts (day, month, year) that will be accepted by date parser. By default, separator characters are: ‘.’, ‘/’ and ‘-’. If it is nil or empty, date separator characters will be use default value.

    Declaration

    Objective-C

    - (void)setDateSeparatorChars:
        (nonnull MBIDateSeparatorCharsArray *)dateSeparatorChars;

    Swift

    func setDateSeparatorChars(_ dateSeparatorChars: [String])