Skip to content

Commit

Permalink
Version bump to 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gf3 committed Mar 1, 2016
1 parent 9c96c27 commit 1effe58
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions dist/moment-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,25 @@ DateRange.prototype.subtract = function(other) {
}
};

/**
* Build a n array of dates.
*
* @param {(!DateRange|String)} range Date range to be used for iteration or
* shorthand string (shorthands:
* http://momentjs.com/docs/#/manipulating/add/)
* @param {!boolean} exclusive Indicate that the end of the range should not
* be included in the iter.
*
* @return {!Array}
*/
DateRange.prototype.toArray = function(by, exclusive) {
var acc = [];
this.by(by, function(unit) {
acc.push(unit);
}, exclusive);
return acc;
};

/**
* Iterate over the date range by a given date range, executing a function
* for each sub-range.
Expand Down
2 changes: 1 addition & 1 deletion dist/moment-range.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1effe58

Please sign in to comment.