@malloydata/malloy-interfaces 0.0.268-dev250422193441 → 0.0.268-dev250422193451
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/to_malloy.js +6 -6
- package/package.json +1 -1
package/dist/to_malloy.js
CHANGED
|
@@ -95,31 +95,31 @@ function serializeDateAsLiteral(date, granularity) {
|
|
|
95
95
|
return `@${year}-Q${quarter}`;
|
|
96
96
|
}
|
|
97
97
|
case 'month': {
|
|
98
|
-
const year = digits(date.getUTCFullYear(),
|
|
98
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
99
99
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
100
100
|
return `@${year}-${month}`;
|
|
101
101
|
}
|
|
102
102
|
case 'week': {
|
|
103
|
-
const year = digits(date.getUTCFullYear(),
|
|
103
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
104
104
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
105
105
|
const day = digits(date.getUTCDate(), 2);
|
|
106
106
|
return `@WK${year}-${month}-${day}`;
|
|
107
107
|
}
|
|
108
108
|
case 'day': {
|
|
109
|
-
const year = digits(date.getUTCFullYear(),
|
|
109
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
110
110
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
111
111
|
const day = digits(date.getUTCDate(), 2);
|
|
112
112
|
return `@${year}-${month}-${day}`;
|
|
113
113
|
}
|
|
114
114
|
case 'hour': {
|
|
115
|
-
const year = digits(date.getUTCFullYear(),
|
|
115
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
116
116
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
117
117
|
const day = digits(date.getUTCDate(), 2);
|
|
118
118
|
const hour = digits(date.getUTCHours(), 2);
|
|
119
119
|
return `@${year}-${month}-${day} ${hour}`;
|
|
120
120
|
}
|
|
121
121
|
case 'minute': {
|
|
122
|
-
const year = digits(date.getUTCFullYear(),
|
|
122
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
123
123
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
124
124
|
const day = digits(date.getUTCDate(), 2);
|
|
125
125
|
const hour = digits(date.getUTCHours(), 2);
|
|
@@ -127,7 +127,7 @@ function serializeDateAsLiteral(date, granularity) {
|
|
|
127
127
|
return `@${year}-${month}-${day} ${hour}:${minute}`;
|
|
128
128
|
}
|
|
129
129
|
case 'second': {
|
|
130
|
-
const year = digits(date.getUTCFullYear(),
|
|
130
|
+
const year = digits(date.getUTCFullYear(), 4);
|
|
131
131
|
const month = digits(date.getUTCMonth() + 1, 2);
|
|
132
132
|
const day = digits(date.getUTCDate(), 2);
|
|
133
133
|
const hour = digits(date.getUTCHours(), 2);
|