This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

View File

@ -0,0 +1,4 @@
import { PluginFunc } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin

20
node_modules/dayjs/esm/plugin/localizedFormat/index.js generated vendored Normal file
View File

@ -0,0 +1,20 @@
import { FORMAT_DEFAULT } from '../../constant';
import { u, englishFormats } from './utils';
export default (function (o, c, d) {
var proto = c.prototype;
var oldFormat = proto.format;
d.en.formats = englishFormats;
proto.format = function (formatStr) {
if (formatStr === void 0) {
formatStr = FORMAT_DEFAULT;
}
var _this$$locale = this.$locale(),
_this$$locale$formats = _this$$locale.formats,
formats = _this$$locale$formats === void 0 ? {} : _this$$locale$formats;
var result = u(formatStr, formats);
return oldFormat.call(this, result);
};
});

20
node_modules/dayjs/esm/plugin/localizedFormat/utils.js generated vendored Normal file
View File

@ -0,0 +1,20 @@
// eslint-disable-next-line import/prefer-default-export
export var t = function t(format) {
return format.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (_, a, b) {
return a || b.slice(1);
});
};
export var englishFormats = {
LTS: 'h:mm:ss A',
LT: 'h:mm A',
L: 'MM/DD/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A'
};
export var u = function u(formatStr, formats) {
return formatStr.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (_, a, b) {
var B = b && b.toUpperCase();
return a || formats[b] || englishFormats[b] || t(formats[B]);
});
};