From 050ab03448f7badc4e7a46d863c85bbd6c80d8fc Mon Sep 17 00:00:00 2001 From: Edward Wall <33730573+edwardwall@users.noreply.github.com> Date: Sun, 30 Dec 2018 17:06:48 +0000 Subject: [PATCH] Simplify to improve readability --- src/core/operations/ParseX509Certificate.mjs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/operations/ParseX509Certificate.mjs b/src/core/operations/ParseX509Certificate.mjs index 31e5e359..a57f661e 100644 --- a/src/core/operations/ParseX509Certificate.mjs +++ b/src/core/operations/ParseX509Certificate.mjs @@ -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] + "/" +