raptor-journey-planner
Version:
Implementation of the Round bAsed Public Transit Optimized Router (Raptor) journey planning algorithm.
12 lines (11 loc) • 373 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDateNumber = void 0;
/**
* Convert a Date object into a numeric representation e.g. 20190417
*/
function getDateNumber(date) {
const str = date.toISOString();
return parseInt(str.slice(0, 4) + str.slice(5, 7) + str.slice(8, 10), 10);
}
exports.getDateNumber = getDateNumber;