"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useFormatDate = void 0;
var _react = require("react");
var _dateUtils = require("../../utils/dateUtils");
var _Localization = require("../Localization");
var useFormatDate = exports.useFormatDate = function useFormatDate(dateFormat) {
  var localization = (0, _Localization.useLocalization)();
  var format = dateFormat ? dateFormat : localization.dateFormat;
  return (0, _react.useCallback)(function (value, long) {
    return (0, _dateUtils.formatDate)(value, format, long);
  }, [format]);
};
//# sourceMappingURL=useFormatDate.js.map