[* DateTimeV2] Support for context for establishing limits in DatePeriod and DateTimeperiod in ExperimentalMode (#640)
Fix to issue #640 where, in Experimental mode, ambiguous dates are recalculated using the other non-ambiguous date as reference (in DatePeriod and DateTimePeriod). Test cases added to DateTimeModel and DateTimeModelExperimentalMode.
The use of context was already partially implemented in DatePeriod, but it needs to be improved because it produces inconsistent results in certain cases (e.g. "from 5/1/2015 till three days later").
@LionbridgeCSII, we'll review this soon. Is the behaviour in this PR now consistent between the default and experimental modes?
@LionbridgeCSII, we'll review this soon. Is the behaviour in this PR now consistent between the default and experimental modes?
@tellarin, I have not examined all possible scenarios yet, I wanted first to have a feedback on the approach (I am not sure, for example, if adding the new behaviour to experimental mode is appropriate or if it would be better to use another mode). But for the cases I have considered, the behaviour between the two modes seems to be consistent (taking into account that experimental mode adds 1 day to the ranges).
Also, I have not yet addressed the issue with the method ProcessDateEntityParsingResult in DatePeriod (which produces inconsistent results with certain ambiguous dates, e.g. "three days later").