start time as either a Date
object, Unix timestamp, JavaScript timestamp, or date string
stop time as either a Date
object, Unix timestamp, JavaScript timestamp, or date string
function options
array of dates
var stop = '2014-12-02T07:00:54.973Z';
var start = new Date( stop ) - 60000;
var arr = datespace( start, stop, 6 );
// returns [...]
// Equivalent of Math.ceil():
var arr = datespace( 1417503655000, 1417503655001, 3, { 'round': 'ceil' } );
// returns [...]
// Equivalent of Math.round():
var arr = datespace( 1417503655000, 1417503655001, 3, { 'round': 'round' } );
// returns [...]
Generates an array of linearly spaced dates.
start time as either a Date
object, Unix timestamp, JavaScript timestamp, or date string
stop time as either a Date
object, Unix timestamp, JavaScript timestamp, or date string
output array length (default: 100)
function options
array of dates
var stop = '2014-12-02T07:00:54.973Z';
var start = new Date( stop ) - 60000;
var arr = datespace( start, stop, 6 );
// returns [...]
// Equivalent of Math.ceil():
var arr = datespace( 1417503655000, 1417503655001, 3, { 'round': 'ceil' } );
// returns [...]
// Equivalent of Math.round():
var arr = datespace( 1417503655000, 1417503655001, 3, { 'round': 'round' } );
// returns [...]
Generates an array of linearly spaced dates.
must provide valid options