12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import {
- __commonJS
- } from "./chunk-UQGIA5KH.js";
- // ../../../../../../Users/xuruhua/Desktop/zx/new-zx-front-app/node_modules/dayjs/plugin/relativeTime.js
- var require_relativeTime = __commonJS({
- "../../../../../../Users/xuruhua/Desktop/zx/new-zx-front-app/node_modules/dayjs/plugin/relativeTime.js"(exports, module) {
- !function(r, e) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (r = "undefined" != typeof globalThis ? globalThis : r || self).dayjs_plugin_relativeTime = e();
- }(exports, function() {
- "use strict";
- return function(r, e, t) {
- r = r || {};
- var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
- function i(r2, e2, t2, o2) {
- return n.fromToBase(r2, e2, t2, o2);
- }
- t.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
- for (var f, a, s, l = i2.$locale().relativeTime || o, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h.length, c = 0; c < m; c += 1) {
- var y = h[c];
- y.d && (f = d2 ? t(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
- var p = (r.rounding || Math.round)(Math.abs(f));
- if (s = f > 0, p <= y.r || !y.r) {
- p <= 1 && c > 0 && (y = h[c - 1]);
- var v = l[y.l];
- u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
- break;
- }
- }
- if (n2)
- return a;
- var M = s ? l.future : l.past;
- return "function" == typeof M ? M(a) : M.replace("%s", a);
- }, n.to = function(r2, e2) {
- return i(r2, e2, this, true);
- }, n.from = function(r2, e2) {
- return i(r2, e2, this);
- };
- var d = function(r2) {
- return r2.$u ? t.utc() : t();
- };
- n.toNow = function(r2) {
- return this.to(d(this), r2);
- }, n.fromNow = function(r2) {
- return this.from(d(this), r2);
- };
- };
- });
- }
- });
- export default require_relativeTime();
- //# sourceMappingURL=dayjs_plugin_relativeTime.js.map
|