Skip to content

Commit d7c2dea

Browse files
author
Michael Hillman
committed
hotfix-twa-vf: formatting.
1 parent f4475d9 commit d7c2dea

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

web/twa-vis-framework/library/src/ts/ui/timeseries_handler.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,13 @@ class TimeseriesHandler {
5858
var timeClass = null
5959
var firstTime = tableTimes[0];
6060

61-
// // Regex tokens to test before and after conversion to Moment format
62-
// var regexBeforeMoment = String(firstTime).match(/^\d{4}-\d{2}-\d{2}T\d{2}(:\d{2}){1,2}Z/);
63-
// var regexAfterMoment = String(firstTime).match(/^\d{4}-\d{2}-\d{2}\s\d{2}(:\d{2}){1,2}/);
64-
65-
// if(regexBeforeMoment || regexAfterMoment) {
66-
// timeClass = "dateTime"
67-
// } else if(String(firstTime).includes(":")) {
68-
// timeClass = "offsetTime"
69-
// } else {
70-
// timeClass = "number";
71-
// }
72-
61+
// Attempt to determine if time values are dates, times, or numbers
7362
if(isNaN(Date.parse(firstTime)) && isNaN(Date.parse(firstTime.replaceAll("-", "/")))) {
7463
if(firstTime.includes(":")) {
7564
timeClass = "offsetTime"
7665
} else {
7766
timeClass = "number";
7867
}
79-
8068
} else {
8169
timeClass = "dateTime";
8270
}

0 commit comments

Comments
 (0)