candlestick-to-png
Version:
Lightweight library to draw an array of candles into a canvas and render it as png file.
8 lines (7 loc) • 358 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.daysBefore = exports.oneDayAgo = void 0;
const oneDayAgo = () => new Date(Date.now() - (24 * 60 * 60 * 1000));
exports.oneDayAgo = oneDayAgo;
const daysBefore = (d, beforeDays) => new Date(d.getTime() - (beforeDays * 24 * 60 * 60 * 1000));
exports.daysBefore = daysBefore;