MBPDateParser

Objective-C


@interface MBPDateParser : MBPParser <NSCopying>

Swift

class MBPDateParser : MBPParser, NSCopying

MBPDateParser that can extract date from OCR result.

  • Date parser result

    Declaration

    Objective-C

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

    Swift

    var result: MBPDateParserResult { get }
  • Specifies the date formats that will be accepted by date parser. By default, all available numeric date formats from MBPDateFormat 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 MBPDateFormatArray *)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 MBPDateSeparatorCharsArray *)dateSeparatorChars;

    Swift

    func setDateSeparatorChars(_ dateSeparatorChars: [String])