From 72a2f418c8156eefa40532742768a21cdaa9542b Mon Sep 17 00:00:00 2001 From: Kevin Jin Date: Sun, 27 Sep 2015 10:41:58 -0400 Subject: [PATCH] Pass through unrecognized directives For compatibility with strftime() on Unix, preserve the percent sign for unrecognized directives when appending to resultString. --- strftime.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/strftime.js b/strftime.js index d34ad58..8deb8b1 100644 --- a/strftime.js +++ b/strftime.js @@ -494,6 +494,8 @@ break; default: + if (isInScope) + resultString += '%'; resultString += format[i]; break; }