PromoCursed/node_modules/dayjs/plugin/negativeYear.js
2024-08-20 23:25:37 +04:00

1 line
570 B
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_negativeYear=t()}(this,(function(){"use strict";return function(e,t,n){var i=t.prototype,o=function(e){var t=e.date,i=e.utc;if("string"==typeof t&&"-"===t.charAt(0)){var o=t.slice(1),r=n(o),f=(r=i?n.utc(o):n(o)).year();return-1!==t.indexOf("-"+f)?n(r).subtract(2*f,"year").toDate():t}return t},r=i.parse;i.parse=function(e){e.date=o.bind(this)(e),r.bind(this)(e)}}}));