We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c400f54 commit 27f12b3Copy full SHA for 27f12b3
packages/cubejs-backend-shared/src/time.ts
@@ -104,10 +104,10 @@ export function parseSqlInterval(intervalStr: SqlInterval): ParsedInterval {
104
105
for (let i = 0; i < parts.length; i += 2) {
106
const value = parseInt(parts[i], 10);
107
- const unit = parts[i + 1];
+ const unit = parts[i + 1].toLowerCase();
108
109
// Remove ending 's' (e.g., 'days' -> 'day')
110
- const singularUnit = ((unit.endsWith('s') ? unit.slice(0, -1) : unit).toLowerCase()) as unitOfTime.DurationConstructor;
+ const singularUnit = (unit.endsWith('s') ? unit.slice(0, -1) : unit) as unitOfTime.DurationConstructor;
111
interval[singularUnit] = value;
112
}
113
0 commit comments