Skip to content

Commit 050ab03

Browse files
author
Edward Wall
authored
Simplify to improve readability
1 parent 40acf75 commit 050ab03

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/core/operations/ParseX509Certificate.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,7 @@ ${extensions}`;
207207
*/
208208
function formatDate (dateStr) {
209209
if (dateStr.length === 13) { // UTC Time
210-
if (dateStr[0] < "5") {
211-
dateStr = "20" + dateStr;
212-
} else {
213-
dateStr = "19" + dateStr;
214-
}
210+
dateStr = (dateStr[0] < "5" ? "20" : "19") + dateStr;
215211
}
216212
return dateStr[6] + dateStr[7] + "/" +
217213
dateStr[4] + dateStr[5] + "/" +

0 commit comments

Comments
 (0)