"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.filter = filter;
const moment_1 = __importDefault(require("moment"));
const DEFAULT_FORMAT = 'ddd D MMM'; // e.g. Thu 27 Aug
/**
 * Calculates the result of adding {days} days to the base date
 * @param base
 * @param days
 */
function calculateTarget(base, days) {
    return (0, moment_1.default)(base).add(days, 'days');
}
function filter(baseDate, format = DEFAULT_FORMAT, day = 0) {
    return calculateTarget(baseDate, day).format(format);
}
//# sourceMappingURL=nunjucks-date.js.map