"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.calcNightWithDeals = void 0;
var _locale = require("@mirai/locale");
var _helpers = require("../../../helpers");
const calcNightWithDeals = (from, to, highlights) => {
  let value = 0;
  highlights.forEach(highlight => {
    const highlightDate = (0, _locale.parseDate)(highlight, _helpers.CALENDAR_FORMAT);
    if (highlightDate >= from && highlightDate <= to) value++;
  });
  return value;
};
exports.calcNightWithDeals = calcNightWithDeals;
//# sourceMappingURL=calcNightWithDeals.js.map