mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat(CalendarFrame): adding previous calendar quarter (#31889)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user