From: quietmint Date: Tue, 26 Mar 2013 12:31:43 +0000 (-0400) Subject: Removed regex in endOf() X-Git-Tag: 2.1.0~52^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F693%2Fhead;p=thirdparty%2Fmoment.git Removed regex in endOf() --- diff --git a/moment.js b/moment.js index aaeaa482b..db137a5d7 100644 --- a/moment.js +++ b/moment.js @@ -1231,7 +1231,7 @@ }, endOf: function (units) { - return this.startOf(units).add(units.replace(/(.)s$/, "$1"), 1).subtract('ms', 1); + return this.startOf(units).add(units, 1).subtract('ms', 1); }, isAfter: function (input, units) {