Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19640#discussion_r150493195
--- Diff: core/src/main/resources/org/apache/spark/ui/static/historypage.js
---
@@ -38,8 +38,17 @@ function makeIdNumeric(id) {
}
function formatDate(date) {
- if (date <= 0) return "-";
- else return date.split(".")[0].replace("T", " ");
+ if (date <= 0) {
+ return "-";
+ } else {
+ var dt = new Date(date);
+ return dt.getFullYear() + "-" +
+ ("0" + (dt.getMonth() + 1)).slice(-2) + "-" +
--- End diff --
this looks a bit hacky, is there any way in js to print a number to 2
letters?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]