Skip to content

Commit 27f12b3

Browse files
committed
fix
1 parent c400f54 commit 27f12b3

File tree

1 file changed

+2
-2
lines changed
  • packages/cubejs-backend-shared/src

1 file changed

+2
-2
lines changed

packages/cubejs-backend-shared/src/time.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ export function parseSqlInterval(intervalStr: SqlInterval): ParsedInterval {
104104

105105
for (let i = 0; i < parts.length; i += 2) {
106106
const value = parseInt(parts[i], 10);
107-
const unit = parts[i + 1];
107+
const unit = parts[i + 1].toLowerCase();
108108

109109
// Remove ending 's' (e.g., 'days' -> 'day')
110-
const singularUnit = ((unit.endsWith('s') ? unit.slice(0, -1) : unit).toLowerCase()) as unitOfTime.DurationConstructor;
110+
const singularUnit = (unit.endsWith('s') ? unit.slice(0, -1) : unit) as unitOfTime.DurationConstructor;
111111
interval[singularUnit] = value;
112112
}
113113

0 commit comments

Comments
 (0)