|
@ -14,8 +14,17 @@ var DateUtil = require('./DateUtil'); |
|
|
*/ |
|
|
*/ |
|
|
function Range(body, options) { |
|
|
function Range(body, options) { |
|
|
var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); |
|
|
var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); |
|
|
this.start = options.start || now.clone().add(-3, 'days').valueOf(); |
|
|
|
|
|
this.end = options.end || now.clone().add(4, 'days').valueOf(); |
|
|
|
|
|
|
|
|
var start = now.clone().add(-3, 'days').valueOf(); |
|
|
|
|
|
var end = now.clone().add(-3, 'days').valueOf(); |
|
|
|
|
|
|
|
|
|
|
|
if(options === undefined) { |
|
|
|
|
|
this.start = start; |
|
|
|
|
|
this.end = end; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.start = options.start || start |
|
|
|
|
|
this.end = options.end || end |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.rolling = false; |
|
|
this.rolling = false; |
|
|
|
|
|
|
|
|
this.body = body; |
|
|
this.body = body; |
|
|