src/cal-heatmap.js
function (d, range) {
		"use strict";

		var start = new Date(d.getFullYear(), d.getMonth(), d.getDate());
		var stop = null;
		if (range instanceof Date) {
			stop = new Date(range.getFullYear(), range.getMonth(), range.getDate());
		} else {
			stop = new Date(start);
			stop = new Date(stop.setDate(stop.getDate() + parseInt(range, 10)));
		}

		return d3.time.days(Math.min(start, stop), Math.max(start, stop));
	}
function (d, range) {
		"use strict";

		var start = new Date(d.getFullYear(), d.getMonth(), d.getDate());
		var stop = null;
		if (range instanceof Date) {
			stop = new Date(range.getFullYear(), range.getMonth(), range.getDate());
		} else {
			stop = new Date(start);
			stop = new Date(stop.setDate(stop.getDate() + parseInt(range, 10)));
		}

		return d3.time.days(Math.min(start, stop), Math.max(start, stop));
	}
function ( d , range ) { "use strict" ; var start = new Date ( d . getFullYear ( ) , d . getMonth ( ) , d . getDate ( ) ) ; var stop = null ; if ( range instanceof Date ) { stop = new Date ( range . getFullYear ( ) , range . getMonth ( ) , range . getDate ( ) ) ; } else { stop = new Date ( start ) ; stop = new Date ( stop . setDate ( stop . getDate ( ) + parseInt ( range , 10 ) ) ) ; } return d3 . time . days ( Math . min ( start , stop ) , Math . max ( start , stop ) ) ; }
Return all the days between 2 dates

@param  Date		d		A date
@param  int|date	range	Number of days in the range, or a stop date
@return array	An array of weeks
Return all the days between 2 dates