public PortugueseDateParserConfiguration(ICommonDateTimeParserConfiguration config) : base(config) { DateTokenPrefix = DateTimeDefinitions.DateTokenPrefix; DateRegexes = new PortugueseDateExtractorConfiguration(this).DateRegexList; OnRegex = PortugueseDateExtractorConfiguration.OnRegex; SpecialDayRegex = PortugueseDateExtractorConfiguration.SpecialDayRegex; SpecialDayWithNumRegex = PortugueseDateExtractorConfiguration.SpecialDayWithNumRegex; NextRegex = PortugueseDateExtractorConfiguration.NextDateRegex; ThisRegex = PortugueseDateExtractorConfiguration.ThisRegex; LastRegex = PortugueseDateExtractorConfiguration.LastDateRegex; UnitRegex = PortugueseDateExtractorConfiguration.DateUnitRegex; WeekDayRegex = PortugueseDateExtractorConfiguration.WeekDayRegex; MonthRegex = PortugueseDateExtractorConfiguration.MonthRegex; WeekDayOfMonthRegex = PortugueseDateExtractorConfiguration.WeekDayOfMonthRegex; ForTheRegex = PortugueseDateExtractorConfiguration.ForTheRegex; WeekDayAndDayOfMothRegex = PortugueseDateExtractorConfiguration.WeekDayAndDayOfMothRegex; RelativeMonthRegex = PortugueseDateExtractorConfiguration.RelativeMonthRegex; YearSuffix = PortugueseDateExtractorConfiguration.YearSuffix; RelativeWeekDayRegex = PortugueseDateExtractorConfiguration.RelativeWeekDayRegex; DayOfMonth = config.DayOfMonth; DayOfWeek = config.DayOfWeek; MonthOfYear = config.MonthOfYear; CardinalMap = config.CardinalMap; IntegerExtractor = config.IntegerExtractor; OrdinalExtractor = config.OrdinalExtractor; CardinalExtractor = config.CardinalExtractor; NumberParser = config.NumberParser; DurationExtractor = config.DurationExtractor; DateExtractor = config.DateExtractor; DurationParser = config.DurationParser; UnitMap = config.UnitMap; UtilityConfiguration = config.UtilityConfiguration; }
public PortugueseDateParserConfiguration(ICommonDateTimeParserConfiguration config) : base(config) { DateTokenPrefix = DateTimeDefinitions.DateTokenPrefix; DateRegexes = new PortugueseDateExtractorConfiguration(this).DateRegexList; OnRegex = PortugueseDateExtractorConfiguration.OnRegex; SpecialDayRegex = PortugueseDateExtractorConfiguration.SpecialDayRegex; SpecialDayWithNumRegex = PortugueseDateExtractorConfiguration.SpecialDayWithNumRegex; NextRegex = PortugueseDateExtractorConfiguration.NextDateRegex; ThisRegex = PortugueseDateExtractorConfiguration.ThisRegex; LastRegex = PortugueseDateExtractorConfiguration.LastDateRegex; UnitRegex = PortugueseDateExtractorConfiguration.DateUnitRegex; WeekDayRegex = PortugueseDateExtractorConfiguration.WeekDayRegex; MonthRegex = PortugueseDateExtractorConfiguration.MonthRegex; WeekDayOfMonthRegex = PortugueseDateExtractorConfiguration.WeekDayOfMonthRegex; ForTheRegex = PortugueseDateExtractorConfiguration.ForTheRegex; WeekDayAndDayOfMothRegex = PortugueseDateExtractorConfiguration.WeekDayAndDayOfMothRegex; WeekDayAndDayRegex = PortugueseDateExtractorConfiguration.WeekDayAndDayRegex; RelativeMonthRegex = PortugueseDateExtractorConfiguration.RelativeMonthRegex; StrictRelativeRegex = PortugueseDateExtractorConfiguration.StrictRelativeRegex; YearSuffix = PortugueseDateExtractorConfiguration.YearSuffix; RelativeWeekDayRegex = PortugueseDateExtractorConfiguration.RelativeWeekDayRegex; BeforeAfterRegex = PortugueseDateExtractorConfiguration.BeforeAfterRegex; RelativeDayRegex = new Regex(DateTimeDefinitions.RelativeDayRegex, RegexFlags); NextPrefixRegex = new Regex(DateTimeDefinitions.NextPrefixRegex, RegexFlags); PreviousPrefixRegex = new Regex(DateTimeDefinitions.PreviousPrefixRegex, RegexFlags); UpcomingPrefixRegex = new Regex(DateTimeDefinitions.UpcomingPrefixRegex, RegexFlags); PastPrefixRegex = new Regex(DateTimeDefinitions.PastPrefixRegex, RegexFlags); DayOfMonth = config.DayOfMonth; DayOfWeek = config.DayOfWeek; MonthOfYear = config.MonthOfYear; CardinalMap = config.CardinalMap; IntegerExtractor = config.IntegerExtractor; OrdinalExtractor = config.OrdinalExtractor; CardinalExtractor = config.CardinalExtractor; NumberParser = config.NumberParser; DateExtractor = config.DateExtractor; DurationExtractor = config.DurationExtractor; DurationParser = config.DurationParser; HolidayParser = new BaseHolidayParser(new PortugueseHolidayParserConfiguration(this)); UnitMap = config.UnitMap; UtilityConfiguration = config.UtilityConfiguration; SameDayTerms = DateTimeDefinitions.SameDayTerms.ToImmutableList(); PlusOneDayTerms = DateTimeDefinitions.PlusOneDayTerms.ToImmutableList(); PlusTwoDayTerms = DateTimeDefinitions.PlusTwoDayTerms.ToImmutableList(); MinusOneDayTerms = DateTimeDefinitions.MinusOneDayTerms.ToImmutableList(); MinusTwoDayTerms = DateTimeDefinitions.MinusTwoDayTerms.ToImmutableList(); }