1
0
mirror of synced 2024-11-15 18:53:22 +01:00

Simplify to improve readability

This commit is contained in:
Edward Wall 2018-12-30 17:06:48 +00:00 committed by GitHub
parent 40acf751a8
commit 050ab03448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,11 +207,7 @@ ${extensions}`;
*/
function formatDate (dateStr) {
if (dateStr.length === 13) { // UTC Time
if (dateStr[0] < "5") {
dateStr = "20" + dateStr;
} else {
dateStr = "19" + dateStr;
}
dateStr = (dateStr[0] < "5" ? "20" : "19") + dateStr;
}
return dateStr[6] + dateStr[7] + "/" +
dateStr[4] + dateStr[5] + "/" +