'use strict';

var utils_dayjs = require('./dayjs.js');
require('../defineProperty-lChFfVqi.js');
require('../typeof-D4ZZ_FlZ.js');
require('../toConsumableArray-tBKHqzE3.js');
require('../unsupportedIterableToArray-BoHMiKNA.js');
require('dayjs');

/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */
var getDefaultFormat = function getDefaultFormat() {
  var _globalProps$user$dat, _globalProps;
  return (_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 || (_globalProps = _globalProps.user) === null || _globalProps === void 0 ? void 0 : _globalProps.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY";
};
var timeFormat = {
  fromNow: function fromNow(time) {
    return utils_dayjs(time).fromNow();
  },
  time: function time(_time) {
    return utils_dayjs(_time).format("LT");
  },
  timeWithSeconds: function timeWithSeconds(time) {
    return utils_dayjs(time).format("LTS");
  },
  date: function date(time) {
    return utils_dayjs(time).format("ll");
  },
  dateWeek: function dateWeek(time) {
    return utils_dayjs(time).format("ll ddd");
  },
  dateWeekDayExtended: function dateWeekDayExtended(time) {
    return utils_dayjs(time).format("ll dddd");
  },
  dateWeekWithoutYear: function dateWeekWithoutYear(time) {
    return utils_dayjs(time).format("MMM D, ddd");
  },
  dateWeekWithoutYearDayExtended: function dateWeekWithoutYearDayExtended(time) {
    return utils_dayjs(time).format("MMM D, dddd");
  },
  dateTime: function dateTime(time) {
    return utils_dayjs(time).format("ll LT");
  },
  dateTimeWithSeconds: function dateTimeWithSeconds(time) {
    return utils_dayjs(time).format("ll LTS");
  },
  dateWeekTime: function dateWeekTime(time) {
    return utils_dayjs(time).format("ll ddd LT");
  },
  dateWeekTimeDayExtended: function dateWeekTimeDayExtended(time) {
    return utils_dayjs(time).format("ll dddd LT");
  },
  extended: function extended(time) {
    var dateTime = utils_dayjs(time).format("dddd LL LT");
    var fromNow = utils_dayjs(time).fromNow();
    return "".concat(dateTime, " (").concat(fromNow, ")");
  },
  "default": function _default(time) {
    return utils_dayjs(time).format(getDefaultFormat());
  },
  defaultWithTime: function defaultWithTime(time) {
    return utils_dayjs(time).format("".concat(getDefaultFormat(), " LT"));
  }
};
var dateFormat = timeFormat;

exports.dateFormat = dateFormat;
exports.timeFormat = timeFormat;
//# sourceMappingURL=datetime.js.map
