moment-range
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -24,3 +24,3 @@ { | ||
}, | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"engines": { | ||
@@ -27,0 +27,0 @@ "node": "*" |
@@ -43,3 +43,11 @@ moment-range | ||
``` | ||
A optional second parameter indicates if the end of the range | ||
should be excluded when testing for inclusion | ||
``` javascript | ||
range.contains(end) // true | ||
range.contains(end, false) // true | ||
range.contains(end, true) // false | ||
``` | ||
Find out if your moment falls within a date range: | ||
@@ -114,2 +122,13 @@ | ||
Iteration also supports excluding the end value of the range by setting the | ||
last parameter to ```true```. | ||
``` javascript | ||
acc2 = []; | ||
range1.by('d', function (moment) { | ||
acc2.push(moment) | ||
}, true); | ||
acc2.length == 4 // true | ||
``` | ||
### Compare | ||
@@ -116,0 +135,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
55929
289