From e38da4cf75f4fbd918555328e2602088881f132d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pl=C3=ADchal?= Date: Mon, 22 Jun 2020 23:26:57 +0200 Subject: [PATCH] Use calendar year quarters [fix #223] --- did/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/did/base.py b/did/base.py index 4f8b102e..c3ade6d9 100644 --- a/did/base.py +++ b/did/base.py @@ -255,7 +255,7 @@ def last_month(): def this_quarter(): """ Return start and end date of this quarter. """ since = TODAY + delta(day=1) - while since.month % 3 != 0: + while since.month % 3 != 1: since -= delta(months=1) until = since + delta(months=3) return Date(since), Date(until)