]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Removed regex in endOf() 693/head
authorquietmint <quietmint@example.local>
Tue, 26 Mar 2013 12:31:43 +0000 (08:31 -0400)
committerquietmint <quietmint@example.local>
Tue, 26 Mar 2013 12:31:43 +0000 (08:31 -0400)
moment.js

index aaeaa482baafe09d2abaefbf1e8b00a32870eef9..db137a5d7e1abe146728ecded32023d3a594686e 100644 (file)
--- a/moment.js
+++ b/moment.js
         },
 
         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) {