DateRange component
$ component install component/date-range
var DateRange = require('./');
var now = new Date;
var future = new Date(Date.now() + 60000 * 5);
var range = new DateRange(now, future);
Initialize a new DateRange from
one date to
another. If
one date is larger than the other they are normalized so that .from()
is always the smallest date.
Set / get from date
.
Set / get to date
.
Return diff in milliseconds
Return JSON representation.
Check if this range is identical to other
.
Return string representation.
MIT