fix(sqlite): week grain refer to day of week (#16293)

This commit is contained in:
Ville Brofeldt 2021-08-17 15:45:08 +03:00 committed by GitHub
parent 9876c36f6e
commit 5e75baf0cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class SqliteEngineSpec(BaseEngineSpec):
"PT1M": "DATETIME(STRFTIME('%Y-%m-%dT%H:%M:00', {col}))",
"PT1H": "DATETIME(STRFTIME('%Y-%m-%dT%H:00:00', {col}))",
"P1D": "DATE({col})",
"P1W": "DATE({col}, -strftime('%W', {col}) || ' days')",
"P1W": "DATE({col}, -strftime('%w', {col}) || ' days')",
"P1M": "DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')",
"P0.25Y": (
"DATETIME(STRFTIME('%Y-', {col}) || " # year