UNPKG

dayjs-ext

Version:

2KB immutable date time library alternative to Moment.js with the same modern API

3 lines (2 loc) 547 B
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.dayjs_plugin_buddhistEra=e()}(this,function(){"use strict";return function(t,e){var n=e.prototype,r=n.format;n.format=function(t){var e=this,n=this.$utils(),i=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/BBBB|BB/g,function(t){switch(t){case"BB":return n.padStart(String(e.$y+543).slice(-2),2,"0");default:return n.padStart(String(e.$y+543),4,"0")}});return r.bind(this)(i)}}}); //# sourceMappingURL=buddhistEra.js.map