From 9835887fa1af536bb1f4500844e8d3faac90b605 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Sat, 20 Nov 2021 12:56:44 -0500 Subject: [PATCH] When parsing "this afternoon" we are not passing to the recursive parse() calls any sourceTime values given Add sourceTime to the call for when CRE_TIME match happens when parsing the remaining text chunks --- parsedatetime/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsedatetime/__init__.py b/parsedatetime/__init__.py index 6cde94e..25320cd 100644 --- a/parsedatetime/__init__.py +++ b/parsedatetime/__init__.py @@ -919,7 +919,7 @@ def _evalModifier(self, modifier, chunk1, chunk2, sourceTime): m = self.ptc.CRE_TIME.match(unit) debug and logging.debug('CRE_TIME matched') (yr, mth, dy, hr, mn, sec, wd, yd, isdst), subctx = \ - self.parse(unit, None, VERSION_CONTEXT_STYLE) + self.parse(unit, sourceTime, VERSION_CONTEXT_STYLE) start = datetime.datetime(yr, mth, dy, hr, mn, sec) target = start + datetime.timedelta(days=offset)