'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var InvalidDateException = _interopDefault(require('./Exceptions/InvalidDateException'));
var CustomDate = _interopDefault(require('./CustomDate'));

var dateConverter = function dateConverter(value) {
  var date = CustomDate.isValid(value);

  if (date === false) {
    throw new InvalidDateException(value);
  }

  return date;
};

exports.dateConverter = dateConverter;
//# sourceMappingURL=Util.js.map
