@bigbinary/neeto-commons-frontend 2.1.5 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.cjs.js CHANGED
@@ -2661,6 +2661,10 @@ var getFromLocalStorage = function getFromLocalStorage(key) {
2661
2661
 
2662
2662
  dayjs__default["default"].extend(relativeTime__default["default"]);
2663
2663
  dayjs__default["default"].extend(updateLocale__default["default"]);
2664
+ var getDefaultFormat = function getDefaultFormat() {
2665
+ var _globalProps$user$dat, _globalProps, _globalProps$user;
2666
+ return (_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : (_globalProps$user = _globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY";
2667
+ };
2664
2668
  var timeFormat = {
2665
2669
  fromNow: function fromNow(time) {
2666
2670
  return dayjs__default["default"](time).fromNow();
@@ -2704,8 +2708,10 @@ var timeFormat = {
2704
2708
  return "".concat(dateTime, " (").concat(fromNow, ")");
2705
2709
  },
2706
2710
  "default": function _default(time) {
2707
- var _globalProps$user$dat, _globalProps, _globalProps$user;
2708
- return dayjs__default["default"](time).format((_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : (_globalProps$user = _globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY");
2711
+ return dayjs__default["default"](time).format(getDefaultFormat());
2712
+ },
2713
+ defaultWithTime: function defaultWithTime(time) {
2714
+ return dayjs__default["default"](time).format("".concat(getDefaultFormat(), " hh:mm:ss A"));
2709
2715
  }
2710
2716
  };
2711
2717
  var dateFormat = timeFormat;