index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var formatRelativeLocale = {
  7. lastWeek: function lastWeek(date) {
  8. switch (date.getUTCDay()) {
  9. case 0:
  10. return "'prošle nedelje u' p";
  11. case 3:
  12. return "'prošle srede u' p";
  13. case 6:
  14. return "'prošle subote u' p";
  15. default:
  16. return "'prošli' EEEE 'u' p";
  17. }
  18. },
  19. yesterday: "'juče u' p",
  20. today: "'danas u' p",
  21. tomorrow: "'sutra u' p",
  22. nextWeek: function nextWeek(date) {
  23. switch (date.getUTCDay()) {
  24. case 0:
  25. return "'sledeće nedelje u' p";
  26. case 3:
  27. return "'sledeću sredu u' p";
  28. case 6:
  29. return "'sledeću subotu u' p";
  30. default:
  31. return "'sledeći' EEEE 'u' p";
  32. }
  33. },
  34. other: 'P'
  35. };
  36. var formatRelative = function formatRelative(token, date, _baseDate, _options) {
  37. var format = formatRelativeLocale[token];
  38. if (typeof format === 'function') {
  39. return format(date);
  40. }
  41. return format;
  42. };
  43. var _default = formatRelative;
  44. exports.default = _default;
  45. module.exports = exports.default;