feat(CalendarFrame): adding previous calendar quarter (#31889)

Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
This commit is contained in:
Alexandru Soare
2025-01-22 18:54:29 +02:00
committed by GitHub
parent b74da7963b
commit e4e07eef5a
6 changed files with 139 additions and 2 deletions

View File

@@ -369,6 +369,15 @@ def get_since_until( # pylint: disable=too-many-arguments,too-many-locals,too-m
and separator not in time_range
):
time_range = "DATETRUNC(DATEADD(DATETIME('today'), -1, MONTH), MONTH) : DATETRUNC(DATETIME('today'), MONTH)" # pylint: disable=line-too-long,useless-suppression # noqa: E501
if (
time_range
and time_range.startswith("previous calendar quarter")
and separator not in time_range
):
time_range = (
"DATETRUNC(DATEADD(DATETIME('today'), -1, QUARTER), QUARTER) : "
"DATETRUNC(DATETIME('today'), QUARTER)" # pylint: disable=line-too-long,useless-suppression # noqa: E501
)
if (
time_range
and time_range.startswith("previous calendar year")