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 0df7f13 commit 8dc8f33Copy full SHA for 8dc8f33
packages/cubejs-schema-compiler/src/compiler/YamlCompiler.ts
@@ -167,6 +167,10 @@ export class YamlCompiler {
167
ast = t.booleanLiteral(code);
168
} else if (typeof code === 'number') {
169
ast = t.numericLiteral(code);
170
+ } else if (code instanceof Date) {
171
+ // Special case when dates are defined in YAML as strings without quotes
172
+ // YAML parser treats them as Date objects, but for conversion we need them as strings
173
+ ast = this.parsePythonAndTranspileToJs(`f"${this.escapeDoubleQuotes(code.toISOString())}"`, errorsReport);
174
}
175
176
if (ast === null) {
0 commit comments