def test__datatypes_helpers_datefromtimex(): timex = Timex(timex='2017-09-27') date = TimexHelpers.date_from_timex(timex) assert date == datetime(2017, 9, 27).date()
def resolve_definite_against_constraint(timex, constraint): timex_date = TimexHelpers.date_from_timex(timex) if constraint.start <= timex_date < constraint.end: return [timex.timex_value()] return ['']