Skip to content

Commit 4edbee1

Browse files
Update index.js
Safari can't parse date strings with - separator, hence using '/'
1 parent a93169f commit 4edbee1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ function getStatusDescriptiveText(color) {
122122
return color == "nodata"
123123
? "No Data Available: Health check was not performed."
124124
: color == "success"
125-
? "No downtime recorded today."
125+
? "No downtime recorded on this day."
126126
: color == "failure"
127-
? "Major outages recorded today."
127+
? "Major outages recorded on this day."
128128
: color == "partial"
129-
? "Partial outages recorded today."
129+
? "Partial outages recorded on this day."
130130
: "Unknown";
131131
}
132132

@@ -183,7 +183,7 @@ function splitRowsByDate(rows) {
183183
}
184184

185185
const [dateTimeStr, resultStr] = row.split(",", 2);
186-
const dateTime = new Date(Date.parse(dateTimeStr + " GMT"));
186+
const dateTime = new Date(Date.parse(dateTimeStr.replace(/-/g, "/") + " GMT"));
187187
const dateStr = dateTime.toDateString();
188188

189189
let resultArray = dateValues[dateStr];

0 commit comments

Comments
 (0)