Server IP : 85.214.239.14 / Your IP : 3.142.248.196 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/task/3/root/proc/3/root/lib/node_modules/pm2/node_modules/dayjs/esm/ |
Upload File : |
import * as C from './constant'; var padStart = function padStart(string, length, pad) { var s = String(string); if (!s || s.length >= length) return string; return "" + Array(length + 1 - s.length).join(pad) + string; }; var padZoneStr = function padZoneStr(instance) { var negMinutes = -instance.utcOffset(); var minutes = Math.abs(negMinutes); var hourOffset = Math.floor(minutes / 60); var minuteOffset = minutes % 60; return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0'); }; var monthDiff = function monthDiff(a, b) { // function from moment.js in order to keep the same result if (a.date() < b.date()) return -monthDiff(b, a); var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()); var anchor = a.clone().add(wholeMonthDiff, C.M); var c = b - anchor < 0; var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), C.M); return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0); }; var absFloor = function absFloor(n) { return n < 0 ? Math.ceil(n) || 0 : Math.floor(n); }; var prettyUnit = function prettyUnit(u) { var special = { M: C.M, y: C.Y, w: C.W, d: C.D, D: C.DATE, h: C.H, m: C.MIN, s: C.S, ms: C.MS, Q: C.Q }; return special[u] || String(u || '').toLowerCase().replace(/s$/, ''); }; var isUndefined = function isUndefined(s) { return s === undefined; }; export default { s: padStart, z: padZoneStr, m: monthDiff, a: absFloor, p: prettyUnit, u: isUndefined };