@malloydata/render 0.0.52 → 0.0.53-dev230706172949
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/html/utils.js +11 -1
- package/package.json +2 -2
package/dist/html/utils.js
CHANGED
|
@@ -77,7 +77,17 @@ function numberFixedDigits(value, digits) {
|
|
|
77
77
|
}
|
|
78
78
|
function timeToString(time, timeframe, timezone) {
|
|
79
79
|
timeframe || (timeframe = malloy_1.TimestampTimeframe.Second);
|
|
80
|
-
|
|
80
|
+
let shouldNormalize = false;
|
|
81
|
+
switch (timeframe) {
|
|
82
|
+
case malloy_1.TimestampTimeframe.Hour:
|
|
83
|
+
case malloy_1.TimestampTimeframe.Minute:
|
|
84
|
+
case malloy_1.TimestampTimeframe.Second:
|
|
85
|
+
shouldNormalize = true;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
const dateTime = luxon_1.DateTime.fromJSDate(time, {
|
|
89
|
+
zone: shouldNormalize && timezone ? timezone : 'UTC',
|
|
90
|
+
});
|
|
81
91
|
switch (timeframe) {
|
|
82
92
|
case malloy_1.TimestampTimeframe.Year:
|
|
83
93
|
case malloy_1.DateTimeframe.Year: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/render",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53-dev230706172949",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"prepublishOnly": "npm run build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@malloydata/malloy": "^0.0.
|
|
21
|
+
"@malloydata/malloy": "^0.0.53-dev230706172949",
|
|
22
22
|
"@types/luxon": "^2.4.0",
|
|
23
23
|
"lodash": "^4.17.20",
|
|
24
24
|
"luxon": "^2.4.0",
|