From 14c8c57cff5d7fe09bf574ef83b0da7e8bf7cad0 Mon Sep 17 00:00:00 2001 From: quietmint Date: Tue, 26 Mar 2013 08:31:43 -0400 Subject: [PATCH] Removed regex in endOf() --- moment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.2