From 51af2bd52aff37c786b75079d17e60a3e4f815b3 Mon Sep 17 00:00:00 2001 From: B~Vladi Date: Sat, 10 May 2014 23:49:59 +0400 Subject: [PATCH] Refactoring --- strftime.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/strftime.js b/strftime.js index 9bbd55c..d0cc2e4 100644 --- a/strftime.js +++ b/strftime.js @@ -96,10 +96,6 @@ _date = new Date(_date.getTime() + (_timeZone * 60000)); } - // Most of the specifiers supported by C's strftime, and some from Ruby. - // Some other syntax extensions from Ruby are supported: %-, %_, and %0 - // to pad with nothing, space, or zero (respectively). - return format.replace(/%([-_0]?)(.)/g, processing); } @@ -233,6 +229,9 @@ function processing(_, p, c) { var _padding; + // Most of the specifiers supported by C's strftime, and some from Ruby. + // Some other syntax extensions from Ruby are supported: %-, %_, and %0 + // to pad with nothing, space, or zero (respectively). if (p) { switch (p) { // omit padding