mat-date 1.9.40 → 1.9.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DateUtil.d.ts +1 -4
- package/dist/DateUtil.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/DateUtil.d.ts
CHANGED
package/dist/DateUtil.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x28d79d={};a0_0x28d79d['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x28d79d),exports['MDateUtil']=void 0x0;const a0_0x33e085=require('@js-temporal/polyfill'),a0_0xcef8b1=(_0x4a3c6d,_0x2a5ba4=0x2)=>_0x4a3c6d['toString']()['padStart'](_0x2a5ba4,'0');function a0_0x4f59ef(_0x355188,_0x32c0b0){try{return _0x355188();}catch(_0x37a9a6){if(_0x32c0b0)return _0x32c0b0;throw new Error('UNKNOWN');}}function a0_0xe1af88(_0x8952d9,_0x433aba){try{if(_0x8952d9 instanceof Date)return a0_0x33e085['Temporal']['Instant']['fromEpochMilliseconds'](_0x8952d9['getTime']())['toZonedDateTimeISO'](_0x433aba)['epochMilliseconds'];if(typeof _0x8952d9==='number')return _0x8952d9;if(typeof _0x8952d9==='string')return a0_0x33e085['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x8952d9)['getTime']())['toZonedDateTimeISO'](_0x433aba)['epochMilliseconds'];if(_0x8952d9 instanceof a0_0x3d9c27)return _0x8952d9['toTime']();if(_0x8952d9['idkey']==='MDateUtil')return _0x8952d9['toTime']();return 0x0;}catch(_0x194b25){throw new Error('ERROR');}}function a0_0x312eb5(_0x2413ff){function _0x502c37(_0x54d0e9){const _0x3e9c48={};return _0x3e9c48['weekday']=_0x54d0e9,a0_0x4f59ef(()=>new Intl['DateTimeFormat'](_0x2413ff['localCode'],_0x3e9c48)['format'](a0_0xe1af88(_0x2413ff,_0x2413ff['zone'])),'');}function _0x5291e2(){return _0x502c37('long');}function _0x25387f(){return _0x502c37('short');}function _0x5a21f0(){return _0x502c37('narrow');}const _0x5c311f={};return _0x5c311f['ln']=_0x5291e2,_0x5c311f['sh']=_0x25387f,_0x5c311f['nr']=_0x5a21f0,_0x5c311f;}function a0_0x373886(_0x59ea8f){let _0x4b869c=undefined,_0x350aca=undefined,_0x436cc9=undefined,_0x5b19e3=undefined;try{const _0x357f41=(_0x59ea8f||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x4b869c=_0x357f41['length']>=0x1?Number(_0x357f41[0x0]):undefined,_0x350aca=_0x357f41['length']>=0x2?Number(_0x357f41[0x1]):undefined,_0x436cc9=_0x357f41['length']>=0x3?Number(_0x357f41[0x2]):undefined;}catch(_0x489b94){}try{let _0xab8ee9=_0x59ea8f||'',_0x3f405f=/\.\d{3}/g,_0x3ae6a0=_0xab8ee9['match'](_0x3f405f)[0x0]['split']('.')['filter'](_0x484dfe=>Boolean(_0x484dfe));_0x5b19e3=_0x3ae6a0['length']>=0x1?Number(_0x3ae6a0[0x0]):undefined;}catch(_0x119418){}const _0x524eb9={};return _0x524eb9['h']=_0x4b869c,_0x524eb9['m']=_0x350aca,_0x524eb9['s']=_0x436cc9,_0x524eb9['ms']=_0x5b19e3,_0x524eb9;}let a0_0x103cc2=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x174750=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x4f12b0(_0x57b27b){return Number(Number(_0x57b27b)['toFixed'](0x0))||0x0;}class a0_0x3d9c27{['val'];['_code']=Intl['NumberFormat']()['resolvedOptions']()['locale'];['_zone']=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];['dyfrmt']=a0_0x312eb5(this);get['localCode'](){return this['_code'];}get['zone'](){return this['_zone'];}['with'](_0x5df6c1){this['val']=this['val']['with']({'year':_0x5df6c1['getFullYear'](),'month':_0x5df6c1['getMonth']()+0x1,'day':_0x5df6c1['getDate'](),'hour':_0x5df6c1['getHours'](),'minute':_0x5df6c1['getMinutes'](),'second':_0x5df6c1['getSeconds'](),'millisecond':_0x5df6c1['getMilliseconds']()});}['init'](){const _0x43eb17=new Date();return this['val']=a0_0x33e085['Temporal']['Instant']['from'](_0x43eb17['toISOString']())['toZonedDateTimeISO'](this['zone']),this['dyfrmt']=a0_0x312eb5(this),this;}['toString'](){return'---';}static['new'](){return new a0_0x3d9c27()['setCode'](a0_0x103cc2)['setZone'](a0_0x174750)['init']();}static['setCode'](_0x5527a3){return a0_0x103cc2=_0x5527a3,this;}static['setZone'](_0x1d2f66){return a0_0x174750=_0x1d2f66,this;}static['seperator'](){return a0_0x4f59ef(()=>new Date()['toLocaleDateString'](a0_0x103cc2)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x4f59ef(()=>a0_0x3d9c27['new']()['setTime'](this['toTime']()));}['setCode'](_0x3416e1){return this['_code']=_0x3416e1,this;}['setZone'](_0x257215){return this['_zone']=_0x257215,this;}['seperator'](){return a0_0x4f59ef(()=>new Date()['toLocaleDateString'](this['_code'])['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x4f59ef(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x57f473=this['_code']){return a0_0x4f59ef(()=>{return new Intl['Locale'](_0x57f473)?.['timeZones']||[];},null);}['region'](_0x359c12=this['_code']){return a0_0x4f59ef(()=>{return new Intl['Locale'](_0x359c12)['region'];},null);}['year'](){return this['val']['year'];}['month'](){return this['val']['month'];}['monthUtc'](){return this['val']['month']-0x1;}['day'](){return this['val']['day'];}['hours'](){return this['val']['hour'];}['min'](){return this['val']['minute'];}['sec'](){return this['val']['second'];}['msec'](){return this['val']['millisecond'];}['dayOfWeek'](){const _0x43b6a7=this['val']['dayOfWeek'];return _0x43b6a7?_0x43b6a7:0x7;}['dayOfWeekUtc'](){return this['val']['dayOfWeek']-0x1;}['setYear'](_0xf0c187){return this['val']=this['val']['with']({'year':a0_0x4f12b0(_0xf0c187)}),this;}['setMonth'](_0x2006f6){return this['val']=this['val']['with']({'month':a0_0x4f12b0(_0x2006f6)}),this;}['setMonthUtc'](_0x2caeaa){return this['val']=this['val']['with']({'month':a0_0x4f12b0(_0x2caeaa)+0x1}),this;}['setDay'](_0x731e5e){return this['val']=this['val']['with']({'day':a0_0x4f12b0(_0x731e5e)}),this;}['setHour'](_0x2694c8){return this['val']=this['val']['with']({'hour':a0_0x4f12b0(_0x2694c8)}),this;}['startOfHours'](){return this['setMin'](0x0),this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfHours'](){return this['setMin'](0x3b),this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setMin'](_0x28d749){return this['val']=this['val']['with']({'minute':a0_0x4f12b0(_0x28d749)}),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x27c231){return this['val']=this['val']['with']({'second':a0_0x4f12b0(_0x27c231)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x360eab){return this['val']=this['val']['with']({'millisecond':a0_0x4f12b0(_0x360eab)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x41c071){const _0x27b982=_0x41c071?new Date(_0x41c071?.['replace']('T','\x20')):new Date();return this['val']=a0_0x33e085['Temporal']['Instant']['from'](_0x27b982['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x326b23){return this['val']=a0_0x33e085['Temporal']['Instant']['fromEpochMilliseconds'](_0x326b23||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x3d4c44){return this['setIsoDate'](_0x3d4c44?.['toISOString']()),this;}['setDateInputValue'](_0x432973){const _0x3bd222=_0x432973?new Date(_0x432973?.['replace']('T','\x20')):new Date();return _0x3bd222['getTime']()&&(this['val']=a0_0x33e085['Temporal']['Instant']['from'](_0x3bd222?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x3bd222)),this;}['setVal'](_0xfd867e){return a0_0x4f59ef(()=>{return a0_0x3d9c27['new']()['setTime'](a0_0xe1af88(_0xfd867e,this['zone']));});}['toIsoDate'](){const _0x3f1a9c={};return _0x3f1a9c['fractionalSecondDigits']=0x3,this['val']['toInstant']()['toString'](_0x3f1a9c);}['toIsoDateZone'](){return this['val']['toString']()['substring'](0x0,0x1d)+'Z';}['toTime'](){return this['val']['epochMilliseconds'];}['toDate'](){return new Date(this['val']['toInstant']()['epochMilliseconds']);}['toDateMounthInput'](){return this['year']()+'-'+a0_0xcef8b1(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0xcef8b1(this['month']())+'-'+a0_0xcef8b1(this['day']());}['toTimeInput'](_0x14d9dc=!![]){const _0x45ef5d=[];return _0x45ef5d['push'](a0_0xcef8b1(this['hours']())),_0x45ef5d['push'](a0_0xcef8b1(this['min']())),_0x14d9dc&&_0x45ef5d['push'](a0_0xcef8b1(this['sec']())),_0x45ef5d['join'](':');}['toDateTimeInput'](_0x3430fa=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x3430fa);}['toAs'](){return this['val']['toInstant']()['toString']();}['strDate'](){const _0x24633d={};return _0x24633d['month']='2-digit',_0x24633d['day']='2-digit',_0x24633d['year']='numeric',this['val']['toLocaleString'](this['_code'],_0x24633d);}['strTime'](){return a0_0xcef8b1(this['hours']())+':'+a0_0xcef8b1(this['min']())+':'+a0_0xcef8b1(this['sec']());}['strHHmm'](){return a0_0xcef8b1(this['hours']())+':'+a0_0xcef8b1(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x1b2eba){return this['val']['toLocaleString'](this['_code'],_0x1b2eba);}['strYears'](){return this['val']['year']['toString']();}['strMounth'](){return a0_0xcef8b1(this['month'](),0x2);}['strDay'](){return a0_0xcef8b1(this['day'](),0x2);}['strHour'](){return a0_0xcef8b1(this['hours'](),0x2);}['strMin'](){return a0_0xcef8b1(this['min'](),0x2);}['strSec'](){return a0_0xcef8b1(this['sec'](),0x2);}['strMsec'](){return a0_0xcef8b1(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addMonth'](_0x3544fb){return this['val']=this['val']['add']({'months':a0_0x4f12b0(_0x3544fb)}),this;}['addDay'](_0x11c17d){return this['addHours'](Number(_0x11c17d)*0x18),this;}['addHours'](_0x5b5acc){return this['addMins'](Number(_0x5b5acc)*0x3c),this;}['addMins'](_0x480fb4){return this['addSecs'](Number(_0x480fb4)*0x3c),this;}['addSecs'](_0x16b5ec){return this['addMilliseconds'](Number(_0x16b5ec)*0x3e8),this;}['addMilliseconds'](_0x5ca838){return this['val']=this['val']['add']({'milliseconds':a0_0x4f12b0(_0x5ca838)}),this;}['startOfDay'](){return this['setHour'](0x0),this['startOfHours'](),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){return this['setHour'](0x17),this['endOfHours'](),this;}['cpyByEndOfDay'](){return this['cpy']()['endOfDay']();}['startOfWeek'](){return this['addDay'](-this['dayOfWeek']()+0x1);}['cpyStartOfWeek'](){return this['cpy']()['addDay'](-this['dayOfWeek']()+0x1);}['endOfWeek'](){return this['startOfWeek']()['addDay'](0x6);}['cpyEndOfWeek'](){return this['cpyStartOfWeek']()['addDay'](0x6);}['startOfMonth'](){return this['setDay'](0x1),this['startOfDay'](),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){return this['setTime'](this['val']['epochMilliseconds'])['startOfMonth']()['addMonth'](0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x2d6ecf){return a0_0x4f59ef(()=>{return this['cpy']()['toTime']()===a0_0xe1af88(_0x2d6ecf,this['zone']);});}['gt'](_0x1f13a0){return a0_0x4f59ef(()=>{return this['cpy']()['toTime']()>a0_0xe1af88(_0x1f13a0,this['zone']);});}['gte'](_0x1515a4){return a0_0x4f59ef(()=>{return this['cpy']()['toTime']()>=a0_0xe1af88(_0x1515a4,this['zone']);});}['lt'](_0x9431f5){return a0_0x4f59ef(()=>{return this['cpy']()['toTime']()<a0_0xe1af88(_0x9431f5,this['zone']);});}['lte'](_0x1b7680){return a0_0x4f59ef(()=>{return this['cpy']()['toTime']()<=a0_0xe1af88(_0x1b7680,this['zone']);});}['btw'](_0x47f1f5,_0x4269b4){return a0_0x4f59ef(()=>{const _0x19d1d1=a0_0xe1af88(_0x47f1f5,this['zone']),_0x2e0315=a0_0xe1af88(_0x4269b4,this['zone']),_0x3ca8aa=this['cpy']()['toTime']();return _0x19d1d1<_0x3ca8aa&&_0x3ca8aa<_0x2e0315;});}['btweq'](_0x264519,_0x5a747c){return a0_0x4f59ef(()=>{const _0xb273a1=a0_0xe1af88(_0x264519,this['zone']),_0x5c975d=a0_0xe1af88(_0x5a747c,this['zone']),_0xd5570c=this['cpy']()['toTime']();return _0xb273a1<=_0xd5570c&&_0xd5570c<=_0x5c975d;});}['btwEqStart'](_0x42a4b4,_0x3f7296){return a0_0x4f59ef(()=>{const _0x29d671=a0_0xe1af88(_0x42a4b4,this['zone']),_0x2585ab=a0_0xe1af88(_0x3f7296,this['zone']),_0x5338cf=this['cpy']()['toTime']();return _0x29d671<=_0x5338cf&&_0x5338cf<_0x2585ab;});}['btwEqEnd'](_0x4ecee9,_0x4c5c0d){return a0_0x4f59ef(()=>{const _0x42fe84=a0_0xe1af88(_0x4ecee9,this['zone']),_0x654496=a0_0xe1af88(_0x4c5c0d,this['zone']),_0xf286f9=this['cpy']()['toTime']();return _0x42fe84<_0xf286f9&&_0xf286f9<=_0x654496;});}static['diffDays'](_0x22e574,_0x609dbe,_0x2fdcca){return a0_0x4f59ef(()=>{const _0x2ea85d=a0_0xe1af88(_0x22e574,a0_0x174750),_0x577bf4=a0_0xe1af88(_0x609dbe,a0_0x174750);return _0x2fdcca?Math['abs'](_0x2ea85d-_0x577bf4)/0x36ee80/0x18:(_0x2ea85d-_0x577bf4)/0x36ee80/0x18;});}static['diffHours'](_0x5050c9,_0x2de840,_0x57e8ff){return a0_0x4f59ef(()=>{const _0x2f5563=a0_0xe1af88(_0x5050c9,a0_0x174750),_0x2a4811=a0_0xe1af88(_0x2de840,a0_0x174750);return _0x57e8ff?Math['abs'](_0x2f5563-_0x2a4811)/0x36ee80:(_0x2f5563-_0x2a4811)/0x36ee80;});}static['diffMins'](_0x1b7009,_0x505893,_0x535fea){return a0_0x4f59ef(()=>{const _0x1a1864=a0_0xe1af88(_0x1b7009,a0_0x174750),_0x1823e7=a0_0xe1af88(_0x505893,a0_0x174750);return _0x535fea?Math['abs'](_0x1a1864-_0x1823e7)/0x3e8/0x3c:(_0x1a1864-_0x1823e7)/0x3e8/0x3c;});}static['diffSecs'](_0x3b4f56,_0xff89e1,_0x895df0){return a0_0x4f59ef(()=>{const _0x468c63=a0_0xe1af88(_0x3b4f56,a0_0x174750),_0x3df89c=a0_0xe1af88(_0xff89e1,a0_0x174750);return _0x895df0?Math['abs'](_0x468c63-_0x3df89c)/0x3e8:(_0x468c63-_0x3df89c)/0x3e8;});}static['divideTime'](_0x2eeab5){return a0_0x4f59ef(()=>a0_0x373886(_0x2eeab5));}}exports['MDateUtil']=a0_0x3d9c27;const a0_0x14b159={};a0_0x14b159['value']='MDateUtil',a0_0x14b159['writable']=![],a0_0x14b159['enumerable']=!![],a0_0x14b159['configurable']=![],Object['defineProperty'](a0_0x3d9c27['prototype'],'idkey',a0_0x14b159);
|
|
1
|
+
'use strict';const a0_0x1467a1={};a0_0x1467a1['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x1467a1),exports['MDateUtil']=void 0x0;const a0_0x156890=require('@js-temporal/polyfill'),a0_0x5883d2=(_0x22245f,_0x533b0b=0x2)=>_0x22245f['toString']()['padStart'](_0x533b0b,'0');function a0_0xf45132(_0x4eb759,_0x4df440){try{return _0x4eb759();}catch(_0x19c264){if(_0x4df440)return _0x4df440;throw new Error('UNKNOWN');}}function a0_0x484b0e(_0x47a4c8,_0x3cdbe1){try{if(_0x47a4c8 instanceof Date)return a0_0x156890['Temporal']['Instant']['fromEpochMilliseconds'](_0x47a4c8['getTime']())['toZonedDateTimeISO'](_0x3cdbe1)['epochMilliseconds'];if(typeof _0x47a4c8==='number')return _0x47a4c8;if(typeof _0x47a4c8==='string')return a0_0x156890['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x47a4c8)['getTime']())['toZonedDateTimeISO'](_0x3cdbe1)['epochMilliseconds'];if(_0x47a4c8 instanceof a0_0xcd5165)return _0x47a4c8['toTime']();if(_0x47a4c8['idkey']==='MDateUtil')return _0x47a4c8['toTime']();return 0x0;}catch(_0x34920b){throw new Error('ERROR');}}function a0_0xbe5e6a(_0x1472c6){function _0x679d02(_0x178f4a){const _0x43e460={};return _0x43e460['weekday']=_0x178f4a,a0_0xf45132(()=>new Intl['DateTimeFormat'](_0x1472c6['localCode'],_0x43e460)['format'](a0_0x484b0e(_0x1472c6,_0x1472c6['zone'])),'');}function _0x29ef2b(){return _0x679d02('long');}function _0x17b258(){return _0x679d02('short');}function _0x4a7b7a(){return _0x679d02('narrow');}const _0xa53057={};return _0xa53057['ln']=_0x29ef2b,_0xa53057['sh']=_0x17b258,_0xa53057['nr']=_0x4a7b7a,_0xa53057;}function a0_0x2033a0(_0x5d8b9d){let _0x327b3a=undefined,_0x2e92ac=undefined,_0x10c9e8=undefined,_0xb48355=undefined;try{const _0x4114ae=(_0x5d8b9d||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x327b3a=_0x4114ae['length']>=0x1?Number(_0x4114ae[0x0]):undefined,_0x2e92ac=_0x4114ae['length']>=0x2?Number(_0x4114ae[0x1]):undefined,_0x10c9e8=_0x4114ae['length']>=0x3?Number(_0x4114ae[0x2]):undefined;}catch(_0x4d7d1a){}try{let _0x22f3fc=_0x5d8b9d||'',_0x2166b0=/\.\d{3}/g,_0x2c20b7=_0x22f3fc['match'](_0x2166b0)[0x0]['split']('.')['filter'](_0x2e85d5=>Boolean(_0x2e85d5));_0xb48355=_0x2c20b7['length']>=0x1?Number(_0x2c20b7[0x0]):undefined;}catch(_0x4c74ac){}const _0x4dc18e={};return _0x4dc18e['h']=_0x327b3a,_0x4dc18e['m']=_0x2e92ac,_0x4dc18e['s']=_0x10c9e8,_0x4dc18e['ms']=_0xb48355,_0x4dc18e;}let a0_0x4a8a87=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x45087c=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x1423d9(_0x3fbf58){return Number(Number(_0x3fbf58)['toFixed'](0x0))||0x0;}class a0_0xcd5165{#val;#_code=Intl['NumberFormat']()['resolvedOptions']()['locale'];#_zone=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];#dyfrmt=a0_0xbe5e6a(this);get['localCode'](){return this.#_code;}get['zone'](){return this.#_zone;}['with'](_0x5be170){this.#val=this.#val['with']({'year':_0x5be170['getFullYear'](),'month':_0x5be170['getMonth']()+0x1,'day':_0x5be170['getDate'](),'hour':_0x5be170['getHours'](),'minute':_0x5be170['getMinutes'](),'second':_0x5be170['getSeconds'](),'millisecond':_0x5be170['getMilliseconds']()});}['init'](){const _0x116956=new Date();return this.#val=a0_0x156890['Temporal']['Instant']['from'](_0x116956['toISOString']())['toZonedDateTimeISO'](this['zone']),this.#dyfrmt=a0_0xbe5e6a(this),this;}['toString'](){return'---';}static['new'](){return new a0_0xcd5165()['setCode'](a0_0x4a8a87)['setZone'](a0_0x45087c)['init']();}static['setCode'](_0x40b4ba){return a0_0x4a8a87=_0x40b4ba,this;}static['setZone'](_0x345d5d){return a0_0x45087c=_0x345d5d,this;}static['seperator'](){return a0_0xf45132(()=>new Date()['toLocaleDateString'](a0_0x4a8a87)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0xf45132(()=>a0_0xcd5165['new']()['setTime'](this['toTime']()));}['setCode'](_0x45958c){return this.#_code=_0x45958c,this;}['setZone'](_0x293e67){return this.#_zone=_0x293e67,this;}['seperator'](){return a0_0xf45132(()=>new Date()['toLocaleDateString'](this.#_code)['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0xf45132(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x5c305e=this.#_code){return a0_0xf45132(()=>{return new Intl['Locale'](_0x5c305e)?.['timeZones']||[];},null);}['region'](_0x5dde77=this.#_code){return a0_0xf45132(()=>{return new Intl['Locale'](_0x5dde77)['region'];},null);}['year'](){return this.#val['year'];}['month'](){return this.#val['month'];}['monthUtc'](){return this.#val['month']-0x1;}['day'](){return this.#val['day'];}['hours'](){return this.#val['hour'];}['min'](){return this.#val['minute'];}['sec'](){return this.#val['second'];}['msec'](){return this.#val['millisecond'];}['dayOfWeek'](){const _0x4c181d=this.#val['dayOfWeek'];return _0x4c181d?_0x4c181d:0x7;}['dayOfWeekUtc'](){return this.#val['dayOfWeek']-0x1;}['setYear'](_0x48b7da){return this.#val=this.#val['with']({'year':a0_0x1423d9(_0x48b7da)}),this;}['setMonth'](_0x25b5e4){return this.#val=this.#val['with']({'month':a0_0x1423d9(_0x25b5e4)}),this;}['setMonthUtc'](_0xd16dd0){return this.#val=this.#val['with']({'month':a0_0x1423d9(_0xd16dd0)+0x1}),this;}['setDay'](_0x567403){return this.#val=this.#val['with']({'day':a0_0x1423d9(_0x567403)}),this;}['setHour'](_0x73d8bd){return this.#val=this.#val['with']({'hour':a0_0x1423d9(_0x73d8bd)}),this;}['startOfHours'](){return this['setMin'](0x0),this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfHours'](){return this['setMin'](0x3b),this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setMin'](_0x1d0325){return this.#val=this.#val['with']({'minute':a0_0x1423d9(_0x1d0325)}),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0xa12982){return this.#val=this.#val['with']({'second':a0_0x1423d9(_0xa12982)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x1633fc){return this.#val=this.#val['with']({'millisecond':a0_0x1423d9(_0x1633fc)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x1373e2){const _0x52a4c3=_0x1373e2?new Date(_0x1373e2?.['replace']('T','\x20')):new Date();return this.#val=a0_0x156890['Temporal']['Instant']['from'](_0x52a4c3['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x558845){return this.#val=a0_0x156890['Temporal']['Instant']['fromEpochMilliseconds'](_0x558845||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x1d3745){return this['setIsoDate'](_0x1d3745?.['toISOString']()),this;}['setDateInputValue'](_0x1b94f7){const _0x2cca0c=_0x1b94f7?new Date(_0x1b94f7?.['replace']('T','\x20')):new Date();return _0x2cca0c['getTime']()&&(this.#val=a0_0x156890['Temporal']['Instant']['from'](_0x2cca0c?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x2cca0c)),this;}['setVal'](_0x48b38a){return a0_0xf45132(()=>{return a0_0xcd5165['new']()['setTime'](a0_0x484b0e(_0x48b38a,this['zone']));});}['toIsoDate'](){const _0x1e7406={};return _0x1e7406['fractionalSecondDigits']=0x3,this.#val['toInstant']()['toString'](_0x1e7406);}['toIsoDateZone'](){return this.#val['toString']()['substring'](0x0,0x1d)+'Z';}['toTime'](){return this.#val['epochMilliseconds'];}['toDate'](){return new Date(this.#val['toInstant']()['epochMilliseconds']);}['toDateMounthInput'](){return this['year']()+'-'+a0_0x5883d2(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x5883d2(this['month']())+'-'+a0_0x5883d2(this['day']());}['toTimeInput'](_0x7b472a=!![]){const _0x3e86dd=[];return _0x3e86dd['push'](a0_0x5883d2(this['hours']())),_0x3e86dd['push'](a0_0x5883d2(this['min']())),_0x7b472a&&_0x3e86dd['push'](a0_0x5883d2(this['sec']())),_0x3e86dd['join'](':');}['toDateTimeInput'](_0x50a101=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x50a101);}['toAs'](){return this.#val['toInstant']()['toString']();}['strDate'](){const _0x32c893={};return _0x32c893['month']='2-digit',_0x32c893['day']='2-digit',_0x32c893['year']='numeric',this.#val['toLocaleString'](this.#_code,_0x32c893);}['strTime'](){return a0_0x5883d2(this['hours']())+':'+a0_0x5883d2(this['min']())+':'+a0_0x5883d2(this['sec']());}['strHHmm'](){return a0_0x5883d2(this['hours']())+':'+a0_0x5883d2(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x4471af){return this.#val['toLocaleString'](this.#_code,_0x4471af);}['strYears'](){return this.#val['year']['toString']();}['strMounth'](){return a0_0x5883d2(this['month'](),0x2);}['strDay'](){return a0_0x5883d2(this['day'](),0x2);}['strHour'](){return a0_0x5883d2(this['hours'](),0x2);}['strMin'](){return a0_0x5883d2(this['min'](),0x2);}['strSec'](){return a0_0x5883d2(this['sec'](),0x2);}['strMsec'](){return a0_0x5883d2(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this.#dyfrmt['ln'](),'sh':()=>this.#dyfrmt['sh'](),'nr':()=>this.#dyfrmt['nr']()};}['addMonth'](_0x31b0dc){return this.#val=this.#val['add']({'months':a0_0x1423d9(_0x31b0dc)}),this;}['addDay'](_0x42c092){return this['addHours'](Number(_0x42c092)*0x18),this;}['addHours'](_0x258439){return this['addMins'](Number(_0x258439)*0x3c),this;}['addMins'](_0x16898b){return this['addSecs'](Number(_0x16898b)*0x3c),this;}['addSecs'](_0x11d727){return this['addMilliseconds'](Number(_0x11d727)*0x3e8),this;}['addMilliseconds'](_0x341021){return this.#val=this.#val['add']({'milliseconds':a0_0x1423d9(_0x341021)}),this;}['startOfDay'](){return this['setHour'](0x0),this['startOfHours'](),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){return this['setHour'](0x17),this['endOfHours'](),this;}['cpyByEndOfDay'](){return this['cpy']()['endOfDay']();}['startOfWeek'](){return this['addDay'](-this['dayOfWeek']()+0x1);}['cpyStartOfWeek'](){return this['cpy']()['addDay'](-this['dayOfWeek']()+0x1);}['endOfWeek'](){return this['startOfWeek']()['addDay'](0x6);}['cpyEndOfWeek'](){return this['cpyStartOfWeek']()['addDay'](0x6);}['startOfMonth'](){return this['setDay'](0x1),this['startOfDay'](),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){return this['setTime'](this.#val['epochMilliseconds'])['startOfMonth']()['addMonth'](0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0xcb6a14){return a0_0xf45132(()=>{return this['cpy']()['toTime']()===a0_0x484b0e(_0xcb6a14,this['zone']);});}['gt'](_0x2a8db8){return a0_0xf45132(()=>{return this['cpy']()['toTime']()>a0_0x484b0e(_0x2a8db8,this['zone']);});}['gte'](_0x51739e){return a0_0xf45132(()=>{return this['cpy']()['toTime']()>=a0_0x484b0e(_0x51739e,this['zone']);});}['lt'](_0x22482e){return a0_0xf45132(()=>{return this['cpy']()['toTime']()<a0_0x484b0e(_0x22482e,this['zone']);});}['lte'](_0x4b614d){return a0_0xf45132(()=>{return this['cpy']()['toTime']()<=a0_0x484b0e(_0x4b614d,this['zone']);});}['btw'](_0x213a30,_0x5a8275){return a0_0xf45132(()=>{const _0x11aaf4=a0_0x484b0e(_0x213a30,this['zone']),_0x5cc8b9=a0_0x484b0e(_0x5a8275,this['zone']),_0x2d94a6=this['cpy']()['toTime']();return _0x11aaf4<_0x2d94a6&&_0x2d94a6<_0x5cc8b9;});}['btweq'](_0x26ce48,_0x16400f){return a0_0xf45132(()=>{const _0xc0fd23=a0_0x484b0e(_0x26ce48,this['zone']),_0x26e377=a0_0x484b0e(_0x16400f,this['zone']),_0x5727c0=this['cpy']()['toTime']();return _0xc0fd23<=_0x5727c0&&_0x5727c0<=_0x26e377;});}['btwEqStart'](_0x2585d5,_0x160d28){return a0_0xf45132(()=>{const _0x40c0d3=a0_0x484b0e(_0x2585d5,this['zone']),_0x4bcda8=a0_0x484b0e(_0x160d28,this['zone']),_0x121a8b=this['cpy']()['toTime']();return _0x40c0d3<=_0x121a8b&&_0x121a8b<_0x4bcda8;});}['btwEqEnd'](_0x487767,_0x492d16){return a0_0xf45132(()=>{const _0x2e6ef9=a0_0x484b0e(_0x487767,this['zone']),_0x7dc355=a0_0x484b0e(_0x492d16,this['zone']),_0x1ba993=this['cpy']()['toTime']();return _0x2e6ef9<_0x1ba993&&_0x1ba993<=_0x7dc355;});}static['diffDays'](_0x3f069c,_0x23a528,_0x1c7648){return a0_0xf45132(()=>{const _0x3a6c23=a0_0x484b0e(_0x3f069c,a0_0x45087c),_0x48f5ab=a0_0x484b0e(_0x23a528,a0_0x45087c);return _0x1c7648?Math['abs'](_0x3a6c23-_0x48f5ab)/0x36ee80/0x18:(_0x3a6c23-_0x48f5ab)/0x36ee80/0x18;});}static['diffHours'](_0x1253eb,_0x10eb18,_0x13588b){return a0_0xf45132(()=>{const _0x5b6275=a0_0x484b0e(_0x1253eb,a0_0x45087c),_0xae866e=a0_0x484b0e(_0x10eb18,a0_0x45087c);return _0x13588b?Math['abs'](_0x5b6275-_0xae866e)/0x36ee80:(_0x5b6275-_0xae866e)/0x36ee80;});}static['diffMins'](_0x20f340,_0xd049e3,_0x24bdd3){return a0_0xf45132(()=>{const _0x4f576a=a0_0x484b0e(_0x20f340,a0_0x45087c),_0x1a18dd=a0_0x484b0e(_0xd049e3,a0_0x45087c);return _0x24bdd3?Math['abs'](_0x4f576a-_0x1a18dd)/0x3e8/0x3c:(_0x4f576a-_0x1a18dd)/0x3e8/0x3c;});}static['diffSecs'](_0xb460ac,_0x2f719a,_0x455399){return a0_0xf45132(()=>{const _0x9f5641=a0_0x484b0e(_0xb460ac,a0_0x45087c),_0x2a3ab7=a0_0x484b0e(_0x2f719a,a0_0x45087c);return _0x455399?Math['abs'](_0x9f5641-_0x2a3ab7)/0x3e8:(_0x9f5641-_0x2a3ab7)/0x3e8;});}static['divideTime'](_0x1e82e4){return a0_0xf45132(()=>a0_0x2033a0(_0x1e82e4));}}exports['MDateUtil']=a0_0xcd5165;const a0_0x1db644={};a0_0x1db644['value']='MDateUtil',a0_0x1db644['writable']=![],a0_0x1db644['enumerable']=!![],a0_0x1db644['configurable']=![],Object['defineProperty'](a0_0xcd5165['prototype'],'idkey',a0_0x1db644);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x3c3651=this&&this['__createBinding']||(Object['create']?function(_0x183adf,_0x4c37be,_0x3f2cac,_0x47f260){if(_0x47f260===undefined)_0x47f260=_0x3f2cac;var _0x17c727=Object['getOwnPropertyDescriptor'](_0x4c37be,_0x3f2cac);if(!_0x17c727||('get'in _0x17c727?!_0x4c37be['__esModule']:_0x17c727['writable']||_0x17c727['configurable'])){var _0x36d68f={};_0x36d68f['enumerable']=!![],_0x36d68f['get']=function(){return _0x4c37be[_0x3f2cac];},_0x17c727=_0x36d68f;}Object['defineProperty'](_0x183adf,_0x47f260,_0x17c727);}:function(_0x232058,_0x1b1f6c,_0x49b177,_0x4705c8){if(_0x4705c8===undefined)_0x4705c8=_0x49b177;_0x232058[_0x4705c8]=_0x1b1f6c[_0x49b177];}),a0_0xef62aa=this&&this['__exportStar']||function(_0x27a061,_0x49477d){for(var _0x5700c5 in _0x27a061)if(_0x5700c5!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x49477d,_0x5700c5))a0_0x3c3651(_0x49477d,_0x27a061,_0x5700c5);},a0_0x37c330={};a0_0x37c330['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x37c330),a0_0xef62aa(require('./DateUtil'),exports);
|