Fancy date ranges for Moment.js
b9541a7 tb: add .toArray, closes #95 4129e7a tb: add toArray to README 7c3ba35 tb: add toArray to README - toArray 'days' param 1effe58 Gianni Chiappetta: Version bump to 2.2.0
You can now create open-ended ranges which go to the earliest or latest possible date:
var rangeUntil = moment.range(null, "2011-05-05");
var rangeFrom = moment.range("2011-03-05", null);
var rangeAllTime = moment.range(null, null);
a6a609e Jeremy Forsythe: Support null as open ended range 5022bf5 Jeremy Forsythe: Add tests for open-ended ranges aca2323 Jeremy Forsythe: Update README.md with examples for open ranges f11230a thomasvanlankveld: Added documentation for creating a range using moment(date).range(interval) 3214a23 thomasvanlankveld: Made wording a little simpler 42ebebd Gianni Chiappetta: Add moment as a dev dependency b75ec4e Gianni Chiappetta: Update README for npm 72e31df Gianni Chiappetta: Version bump to 2.1.0
4841224 Gianni Chiappetta: Add documentation for methods that can return null
(fixes #82)
805e767 Gianni Chiappetta: Add link to JSDocs in README
c415d45 Gianni Chiappetta: Add a missing test case for the subtract
method (fixes #86)
dbe0325 Gianni Chiappetta: Version bump to 2.0.3
NPM main script now uses the compiled dist version.
96d5c24 Adam Biggs: Make sure constructor doesn't throw an error (fixes #78) 853e658 Gianni Chiappetta: Add and configure JSDoc e364120 Gianni Chiappetta: Update npm instructions ca2e745 Gianni Chiappetta: Version bump to 2.0.1
moment has been moved to a peerDependency
which means that moment-range
will play nice in node-land as a moment plugin. going forward you'll need to add moment
to your dependencies and require it before moment-range
, e.g.:
{
"dependencies": {
"moment": "~2",
"moment-range": "~2"
}
}
var moment = require('moment');
var DateRange = require('moment-range');
Revert peerDependency
breaking change
2454508 Gianni Chiappetta: Ignore more stuff 2a7fbe7 Gianni Chiappetta: Add constructor to prototype d95bde0 Gianni Chiappetta: Revert from grunt-browserify back to grunt-umd ee9c229 Gianni Chiappetta: Version bump to 1.1.2
Fix for bower version missing UMD wrapper.
4c492dd (3 hours ago) Gianni Chiappetta: Convert project from CoffeeScript to JavaScript 87cec66 (2 hours ago) Gianni Chiappetta: Add TOC to README a08f779 (44 minutes ago) Gianni Chiappetta: Allow DateRange constructor to accept an array (fixes #69) a5bb421 (30 minutes ago) Gianni Chiappetta: DateRange objects are represented as an ISO 8601 time interval when converted to a string ec0a135 (4 minutes ago) Gianni Chiappetta: Allow DateRanges to be instantiated with an IS0 8601 time interval string (fixes #66) 8fb30e8 (59 seconds ago) Gianni Chiappetta: Version bump to 1.1.0