mat-date 1.15.15 → 1.15.55
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 +4 -0
- package/dist/DateUtil.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/DateUtil.d.ts
CHANGED
|
@@ -115,6 +115,10 @@ export declare class MDateUtil {
|
|
|
115
115
|
btweq(start: MDateUtil | Date | number | string, end: MDateUtil | Date | number | string): boolean;
|
|
116
116
|
btwEqStart(start: MDateUtil | Date | number | string, end: MDateUtil | Date | number | string): boolean;
|
|
117
117
|
btwEqEnd(start: MDateUtil | Date | number | string, end: MDateUtil | Date | number | string): boolean;
|
|
118
|
+
diffDays(time: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
119
|
+
diffHours(time: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
120
|
+
diffMins(time: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
121
|
+
diffSecs(time: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
118
122
|
static diffDays(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
119
123
|
static diffHours(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
120
124
|
static diffMins(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
package/dist/DateUtil.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x3d0ae6={};a0_0x3d0ae6['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x3d0ae6),exports['MDateUtil']=void 0x0;const a0_0x4d086b=require('temporal-polyfill'),a0_0x982bb5=(_0x20c986,_0x54a5de=0x2)=>_0x20c986['toString']()['padStart'](_0x54a5de,'0');function a0_0x34ad74(_0x53ff20,_0x43a333){try{return _0x53ff20();}catch(_0x5b9178){if(_0x43a333)return _0x43a333;throw new Error('UNKNOWN');}}function a0_0x4e1cc7(_0x3ee0ac,_0x4c3423){try{if(_0x3ee0ac instanceof Date)return a0_0x4d086b['Temporal']['Instant']['fromEpochMilliseconds'](_0x3ee0ac['getTime']())['toZonedDateTimeISO'](_0x4c3423)['epochMilliseconds'];if(typeof _0x3ee0ac==='number')return _0x3ee0ac;if(typeof _0x3ee0ac==='string')return a0_0x4d086b['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x3ee0ac)['getTime']())['toZonedDateTimeISO'](_0x4c3423)['epochMilliseconds'];if(_0x3ee0ac instanceof a0_0x40a894)return _0x3ee0ac['toTime']();if(_0x3ee0ac['idkey']==='MDateUtil')return _0x3ee0ac['toTime']();return 0x0;}catch(_0x2217a5){throw new Error('ERROR');}}function a0_0x2354c2(_0x22ab24){function _0x249077(_0x442be5){const _0x9bb7f5={};return _0x9bb7f5['weekday']=_0x442be5,a0_0x34ad74(()=>new Intl['DateTimeFormat'](_0x22ab24['localCode'],_0x9bb7f5)['format'](a0_0x4e1cc7(_0x22ab24,_0x22ab24['zone'])),'');}function _0x11ae94(){return _0x249077('long');}function _0x53c70f(){return _0x249077('short');}function _0x4002f2(){return _0x249077('narrow');}const _0x14ca8b={};return _0x14ca8b['ln']=_0x11ae94,_0x14ca8b['sh']=_0x53c70f,_0x14ca8b['nr']=_0x4002f2,_0x14ca8b;}function a0_0x5545e1(_0x592f79=''){const _0x1946c5={};_0x1946c5['h']=undefined,_0x1946c5['m']=undefined,_0x1946c5['s']=undefined,_0x1946c5['ms']=undefined;const _0x1d9a0e=_0x1946c5,_0x35ced1=_0x592f79['match'](/\b\d{1,2}:\d{2}(?::\d{2})?\b/);if(_0x35ced1?.[0x0]){const [_0x367909,_0xf5a5e,_0x47304d]=_0x35ced1[0x0]['split'](':')['map'](Number);_0x1d9a0e['h']=_0x367909,_0x1d9a0e['m']=_0xf5a5e,_0x1d9a0e['s']=_0x47304d;}const _0xbc2e04=_0x592f79['match'](/\.(\d{1,3})/);return _0xbc2e04?.[0x1]&&(_0x1d9a0e['ms']=Number(_0xbc2e04[0x1]['padEnd'](0x3,'0'))),_0x1d9a0e;}let a0_0x1e7ec8=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x1012ab=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x1b0960(_0x1fa9bf){return Math['floor'](_0x1fa9bf)||0x0;}class a0_0x40a894{#val;#_code=a0_0x1e7ec8;#_zone=a0_0x1012ab;#dyfrmt=a0_0x2354c2(this);get['localCode'](){return this.#_code;}get['zone'](){return this.#_zone;}['with'](_0x2d6121){this.#val=this.#val['with']({'year':_0x2d6121['getFullYear'](),'month':_0x2d6121['getMonth']()+0x1,'day':_0x2d6121['getDate'](),'hour':_0x2d6121['getHours'](),'minute':_0x2d6121['getMinutes'](),'second':_0x2d6121['getSeconds'](),'millisecond':_0x2d6121['getMilliseconds']()});}['init'](){return this.#val=a0_0x4d086b['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this.#dyfrmt=a0_0x2354c2(this),this;}['toString'](){return'---';}static['new'](){return new a0_0x40a894()['setCode'](a0_0x1e7ec8)['setZone'](a0_0x1012ab)['init']();}static['setCode'](_0x515821){return a0_0x1e7ec8=_0x515821,this;}static['setZone'](_0x1e65ba){return a0_0x1012ab=_0x1e65ba,this;}static['seperator'](){return a0_0x34ad74(()=>new Date()['toLocaleDateString'](a0_0x1e7ec8)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x40a894['new']()['setTime'](this['toTime']());}['setCode'](_0x14421f){return this.#_code=_0x14421f,this;}['setZone'](_0x4f0e7a){return this.#_zone=_0x4f0e7a,this;}['seperator'](){return a0_0x34ad74(()=>new Date()['toLocaleDateString'](this.#_code)['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x34ad74(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x1255d0=this.#_code){return a0_0x34ad74(()=>{return new Intl['Locale'](_0x1255d0)?.['timeZones']||[];},null);}['region'](_0x482b66=this.#_code){return a0_0x34ad74(()=>{return new Intl['Locale'](_0x482b66)['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 _0x13d247=this.#val['dayOfWeek'];return _0x13d247?_0x13d247:0x7;}['dayOfWeekUtc'](){return this.#val['dayOfWeek']-0x1;}['setYear'](_0x43d1a8){return this.#val=this.#val['with']({'year':a0_0x1b0960(_0x43d1a8)}),this;}['setMonth'](_0x147dbf){return this.#val=this.#val['with']({'month':a0_0x1b0960(_0x147dbf)}),this;}['setMonthUtc'](_0x4f4bbe){return this.#val=this.#val['with']({'month':a0_0x1b0960(_0x4f4bbe)+0x1}),this;}['setDay'](_0xb25135){return this.#val=this.#val['with']({'day':a0_0x1b0960(_0xb25135)}),this;}['setHour'](_0x1e4f38){return this.#val=this.#val['with']({'hour':a0_0x1b0960(_0x1e4f38)}),this;}['startOfHours'](){const _0x1a793b={};return _0x1a793b['minute']=0x0,_0x1a793b['second']=0x0,_0x1a793b['millisecond']=0x0,this.#val=this.#val['with'](_0x1a793b),this;}['endOfHours'](){const _0x227bbd={};return _0x227bbd['minute']=0x3b,_0x227bbd['second']=0x3b,_0x227bbd['millisecond']=0x3e7,this.#val=this.#val['with'](_0x227bbd),this;}['setMin'](_0x21f0f0){return this.#val=this.#val['with']({'minute':a0_0x1b0960(_0x21f0f0)}),this;}['startOfMin'](){const _0x494997={};return _0x494997['second']=0x0,_0x494997['millisecond']=0x0,this.#val=this.#val['with'](_0x494997),this;}['endOfMin'](){const _0x1847bb={};return _0x1847bb['second']=0x3b,_0x1847bb['millisecond']=0x3e7,this.#val=this.#val['with'](_0x1847bb),this;}['setSeconds'](_0x3dd019){return this.#val=this.#val['with']({'second':a0_0x1b0960(_0x3dd019)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x23db00){return this.#val=this.#val['with']({'millisecond':a0_0x1b0960(_0x23db00)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x3e5704){const _0x5d92ca=_0x3e5704?new Date(_0x3e5704?.['replace']('T','\x20')):new Date();return this.#val=a0_0x4d086b['Temporal']['Instant']['from'](_0x5d92ca['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x19a0dd){return this.#val=a0_0x4d086b['Temporal']['Instant']['fromEpochMilliseconds'](_0x19a0dd||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x3003a2){return this['setIsoDate'](_0x3003a2?.['toISOString']()),this;}['setDateInputValue'](_0x41247e){const _0x301b23=_0x41247e?new Date(_0x41247e?.['replace']('T','\x20')):new Date();return _0x301b23['getTime']()&&(this.#val=a0_0x4d086b['Temporal']['Instant']['from'](_0x301b23?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x301b23)),this;}['setVal'](_0x505cec){return a0_0x40a894['new']()['setTime'](a0_0x4e1cc7(_0x505cec,this['zone']));}['toIsoDate'](){const _0x46dfa5={};return _0x46dfa5['fractionalSecondDigits']=0x3,this.#val['toInstant']()['toString'](_0x46dfa5);}['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_0x982bb5(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x982bb5(this['month']())+'-'+a0_0x982bb5(this['day']());}['toTimeInput'](_0x4e67c8=!![]){const _0x52f07d=[];return _0x52f07d['push'](a0_0x982bb5(this['hours']())),_0x52f07d['push'](a0_0x982bb5(this['min']())),_0x4e67c8&&_0x52f07d['push'](a0_0x982bb5(this['sec']())),_0x52f07d['join'](':');}['toDateTimeInput'](_0x54be08=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x54be08);}['toAs'](){return this.#val['toInstant']()['toString']();}['strDate'](){const _0x3b89c5={};return _0x3b89c5['month']='2-digit',_0x3b89c5['day']='2-digit',_0x3b89c5['year']='numeric',this.#val['toLocaleString'](this.#_code,_0x3b89c5);}['strTime'](){return a0_0x982bb5(this['hours']())+':'+a0_0x982bb5(this['min']())+':'+a0_0x982bb5(this['sec']());}['strHHmm'](){return a0_0x982bb5(this['hours']())+':'+a0_0x982bb5(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x1b989c){return this.#val['toLocaleString'](this.#_code,_0x1b989c);}['strYears'](){return this.#val['year']['toString']();}['strMounth'](){return a0_0x982bb5(this['month'](),0x2);}['strDay'](){return a0_0x982bb5(this['day'](),0x2);}['strHour'](){return a0_0x982bb5(this['hours'](),0x2);}['strMin'](){return a0_0x982bb5(this['min'](),0x2);}['strSec'](){return a0_0x982bb5(this['sec'](),0x2);}['strMsec'](){return a0_0x982bb5(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this.#dyfrmt['ln'](),'sh':()=>this.#dyfrmt['sh'](),'nr':()=>this.#dyfrmt['nr']()};}['addMonth'](_0x447249){return this.#val=this.#val['add']({'months':a0_0x1b0960(_0x447249)}),this;}['addDay'](_0x3302aa){return this['addHours'](_0x3302aa*0x18),this;}['addHours'](_0x5ee2b8){return this['addMins'](_0x5ee2b8*0x3c),this;}['addMins'](_0x12bbda){return this['addSecs'](_0x12bbda*0x3c),this;}['addSecs'](_0x425367){return this['addMilliseconds'](_0x425367*0x3e8),this;}['addMilliseconds'](_0x1e1649){return this.#val=this.#val['add']({'milliseconds':a0_0x1b0960(_0x1e1649)}),this;}['startOfDay'](){const _0x33ce9d={};return _0x33ce9d['hour']=0x0,_0x33ce9d['minute']=0x0,_0x33ce9d['second']=0x0,_0x33ce9d['millisecond']=0x0,this.#val=this.#val['with'](_0x33ce9d),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){const _0x2ee6e0={};return _0x2ee6e0['hour']=0x17,_0x2ee6e0['minute']=0x3b,_0x2ee6e0['second']=0x3b,_0x2ee6e0['millisecond']=0x3e7,this.#val=this.#val['with'](_0x2ee6e0),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'](){const _0x3f04ac={};return _0x3f04ac['day']=0x1,_0x3f04ac['hour']=0x0,_0x3f04ac['minute']=0x0,_0x3f04ac['second']=0x0,_0x3f04ac['millisecond']=0x0,this.#val=this.#val['with'](_0x3f04ac),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){const _0x33c985=a0_0x4d086b['Temporal']['ZonedDateTime']['from'](this.#val),_0x2e86ef={};_0x2e86ef['day']=_0x33c985['daysInMonth'];const _0x349de3={};return _0x349de3['hour']=0x17,_0x349de3['minute']=0x3b,_0x349de3['second']=0x3b,_0x349de3['millisecond']=0x3e7,_0x349de3['microsecond']=0x3e7,_0x349de3['nanosecond']=0x3e7,this.#val=this.#val['with'](_0x2e86ef)['with'](_0x349de3),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x1e8d07){return this['cpy']()['toTime']()===a0_0x4e1cc7(_0x1e8d07,this['zone']);}['gt'](_0x2dbdaf){return this['cpy']()['toTime']()>a0_0x4e1cc7(_0x2dbdaf,this['zone']);}['gte'](_0xae5512){return this['cpy']()['toTime']()>=a0_0x4e1cc7(_0xae5512,this['zone']);}['lt'](_0x3781e0){return this['cpy']()['toTime']()<a0_0x4e1cc7(_0x3781e0,this['zone']);}['lte'](_0x3d8113){return this['cpy']()['toTime']()<=a0_0x4e1cc7(_0x3d8113,this['zone']);}['btw'](_0x22fc51,_0x593c17){const _0x580e57=a0_0x4e1cc7(_0x22fc51,this['zone']),_0x509277=a0_0x4e1cc7(_0x593c17,this['zone']),_0x36ca45=this['cpy']()['toTime']();return _0x580e57<_0x36ca45&&_0x36ca45<_0x509277;}['btweq'](_0xe092a9,_0x33646c){const _0x28d72f=a0_0x4e1cc7(_0xe092a9,this['zone']),_0x1d5a74=a0_0x4e1cc7(_0x33646c,this['zone']),_0xf0927f=this['cpy']()['toTime']();return _0x28d72f<=_0xf0927f&&_0xf0927f<=_0x1d5a74;}['btwEqStart'](_0x17a1e1,_0x1db90c){const _0x3fe69f=a0_0x4e1cc7(_0x17a1e1,this['zone']),_0x4cc3bd=a0_0x4e1cc7(_0x1db90c,this['zone']),_0x34c87a=this['cpy']()['toTime']();return _0x3fe69f<=_0x34c87a&&_0x34c87a<_0x4cc3bd;}['btwEqEnd'](_0x2205b6,_0x4533d5){const _0x5e1e2e=a0_0x4e1cc7(_0x2205b6,this['zone']),_0x157219=a0_0x4e1cc7(_0x4533d5,this['zone']),_0x3993c8=this['cpy']()['toTime']();return _0x5e1e2e<_0x3993c8&&_0x3993c8<=_0x157219;}static['diffDays'](_0x3b012e,_0x5b8349,_0xe17959){const _0x4dd933=a0_0x4e1cc7(_0x3b012e,a0_0x1012ab),_0x31d092=a0_0x4e1cc7(_0x5b8349,a0_0x1012ab);return _0xe17959?Math['abs'](_0x4dd933-_0x31d092)/0x36ee80/0x18:(_0x4dd933-_0x31d092)/0x36ee80/0x18;}static['diffHours'](_0x377415,_0x3942ea,_0x485d40){const _0x53b1b5=a0_0x4e1cc7(_0x377415,a0_0x1012ab),_0xa6cd39=a0_0x4e1cc7(_0x3942ea,a0_0x1012ab);return _0x485d40?Math['abs'](_0x53b1b5-_0xa6cd39)/0x36ee80:(_0x53b1b5-_0xa6cd39)/0x36ee80;}static['diffMins'](_0x589284,_0x39b34a,_0xd57aa2){const _0xff5a2e=a0_0x4e1cc7(_0x589284,a0_0x1012ab),_0x5885c2=a0_0x4e1cc7(_0x39b34a,a0_0x1012ab);return _0xd57aa2?Math['abs'](_0xff5a2e-_0x5885c2)/0x3e8/0x3c:(_0xff5a2e-_0x5885c2)/0x3e8/0x3c;}static['diffSecs'](_0x2e016b,_0x57bda7,_0x259ef7){const _0x495e1e=a0_0x4e1cc7(_0x2e016b,a0_0x1012ab),_0x248235=a0_0x4e1cc7(_0x57bda7,a0_0x1012ab);return _0x259ef7?Math['abs'](_0x495e1e-_0x248235)/0x3e8:(_0x495e1e-_0x248235)/0x3e8;}static['divideTime'](_0xb524e1){return a0_0x5545e1(_0xb524e1);}}exports['MDateUtil']=a0_0x40a894;const a0_0x5b0085={};a0_0x5b0085['value']='MDateUtil',a0_0x5b0085['writable']=![],a0_0x5b0085['enumerable']=!![],a0_0x5b0085['configurable']=![],Object['defineProperty'](a0_0x40a894['prototype'],'idkey',a0_0x5b0085);
|
|
1
|
+
'use strict';const a0_0x3d68b3={};a0_0x3d68b3['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x3d68b3),exports['MDateUtil']=void 0x0;const a0_0x4ffe0a=require('temporal-polyfill'),a0_0x2972aa=(_0x5442c4,_0x3ae960=0x2)=>_0x5442c4['toString']()['padStart'](_0x3ae960,'0');function a0_0x39689c(_0x10d073,_0x2d3970){try{return _0x10d073();}catch(_0x2ee37f){if(_0x2d3970)return _0x2d3970;throw new Error('UNKNOWN');}}function a0_0x17c6c9(_0x35e243,_0x41fbff){try{if(_0x35e243 instanceof a0_0x52a30d||_0x35e243['idkey']==='MDateUtil')return _0x35e243['toTime']();if(typeof _0x35e243==='string'){const _0xe4dc88=Date['parse'](_0x35e243);return a0_0x4ffe0a['Temporal']['Instant']['fromEpochMilliseconds'](_0xe4dc88)['toZonedDateTimeISO'](_0x41fbff)['epochMilliseconds'];}if(typeof _0x35e243==='number')return _0x35e243;if(_0x35e243 instanceof Date)return a0_0x4ffe0a['Temporal']['Instant']['fromEpochMilliseconds'](_0x35e243['getTime']())['toZonedDateTimeISO'](_0x41fbff)['epochMilliseconds'];return 0x0;}catch(_0x20cb4e){throw new Error('ERROR');}}function a0_0x10e6b5(_0x59b6f2){function _0x57f8db(_0x474a98){const _0x31985b={};return _0x31985b['weekday']=_0x474a98,a0_0x39689c(()=>new Intl['DateTimeFormat'](_0x59b6f2['localCode'],_0x31985b)['format'](a0_0x17c6c9(_0x59b6f2,_0x59b6f2['zone'])),'');}function _0x4eb64d(){return _0x57f8db('long');}function _0x2a6aa6(){return _0x57f8db('short');}function _0x26f581(){return _0x57f8db('narrow');}const _0x2a9647={};return _0x2a9647['ln']=_0x4eb64d,_0x2a9647['sh']=_0x2a6aa6,_0x2a9647['nr']=_0x26f581,_0x2a9647;}function a0_0x2e0bae(_0x91f956=''){const _0x3bd1b5={};_0x3bd1b5['h']=undefined,_0x3bd1b5['m']=undefined,_0x3bd1b5['s']=undefined,_0x3bd1b5['ms']=undefined;const _0x3d9ebb=_0x3bd1b5,_0x722d3=_0x91f956['match'](/\b\d{1,2}:\d{2}(?::\d{2})?\b/);if(_0x722d3?.[0x0]){const [_0x3a0592,_0x5090b4,_0x5a8576]=_0x722d3[0x0]['split'](':')['map'](Number);_0x3d9ebb['h']=_0x3a0592,_0x3d9ebb['m']=_0x5090b4,_0x3d9ebb['s']=_0x5a8576;}const _0x5a1c80=_0x91f956['match'](/\.(\d{1,3})/);return _0x5a1c80?.[0x1]&&(_0x3d9ebb['ms']=Number(_0x5a1c80[0x1]['padEnd'](0x3,'0'))),_0x3d9ebb;}let a0_0x37e32b=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x26012e=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x277385(_0x2c63ab){return Math['floor'](_0x2c63ab)||0x0;}class a0_0x52a30d{#val;#_code=a0_0x37e32b;#_zone=a0_0x26012e;#_dyfrmt;get['localCode'](){return this.#_code;}get['zone'](){return this.#_zone;}['with'](_0x1e0052){this.#val=this.#val['with']({'year':_0x1e0052['getFullYear'](),'month':_0x1e0052['getMonth']()+0x1,'day':_0x1e0052['getDate'](),'hour':_0x1e0052['getHours'](),'minute':_0x1e0052['getMinutes'](),'second':_0x1e0052['getSeconds'](),'millisecond':_0x1e0052['getMilliseconds']()});}['init'](){return this.#val=a0_0x4ffe0a['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this;}['toString'](){return'---';}static['new'](){return new a0_0x52a30d()['setCode'](a0_0x37e32b)['setZone'](a0_0x26012e)['init']();}static['setCode'](_0x46dcd4){return a0_0x37e32b=_0x46dcd4,this;}static['setZone'](_0x4751d2){return a0_0x26012e=_0x4751d2,this;}static['seperator'](){return a0_0x39689c(()=>new Date()['toLocaleDateString'](a0_0x37e32b)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x52a30d['new']()['setTime'](this['toTime']());}['setCode'](_0x275cb7){return this.#_code=_0x275cb7,this;}['setZone'](_0x5cf7ba){return this.#_zone=_0x5cf7ba,this;}['seperator'](){return a0_0x39689c(()=>new Date()['toLocaleDateString'](this.#_code)['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x39689c(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x5af67b=this.#_code){return a0_0x39689c(()=>{return new Intl['Locale'](_0x5af67b)?.['timeZones']||[];},null);}['region'](_0x9d7b9f=this.#_code){return a0_0x39689c(()=>{return new Intl['Locale'](_0x9d7b9f)['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 _0xcc2dbe=this.#val['dayOfWeek'];return _0xcc2dbe?_0xcc2dbe:0x7;}['dayOfWeekUtc'](){return this.#val['dayOfWeek']-0x1;}['setYear'](_0x3565e0){return this.#val=this.#val['with']({'year':a0_0x277385(_0x3565e0)}),this;}['setMonth'](_0x4a9d76){return this.#val=this.#val['with']({'month':a0_0x277385(_0x4a9d76)}),this;}['setMonthUtc'](_0x2ddc6a){return this.#val=this.#val['with']({'month':a0_0x277385(_0x2ddc6a)+0x1}),this;}['setDay'](_0x14e7c8){return this.#val=this.#val['with']({'day':a0_0x277385(_0x14e7c8)}),this;}['setHour'](_0x22a953){return this.#val=this.#val['with']({'hour':a0_0x277385(_0x22a953)}),this;}['startOfHours'](){const _0x5cb4ec={};return _0x5cb4ec['minute']=0x0,_0x5cb4ec['second']=0x0,_0x5cb4ec['millisecond']=0x0,this.#val=this.#val['with'](_0x5cb4ec),this;}['endOfHours'](){const _0x3e02ff={};return _0x3e02ff['minute']=0x3b,_0x3e02ff['second']=0x3b,_0x3e02ff['millisecond']=0x3e7,this.#val=this.#val['with'](_0x3e02ff),this;}['setMin'](_0x3c0cab){return this.#val=this.#val['with']({'minute':a0_0x277385(_0x3c0cab)}),this;}['startOfMin'](){const _0x3e8e5e={};return _0x3e8e5e['second']=0x0,_0x3e8e5e['millisecond']=0x0,this.#val=this.#val['with'](_0x3e8e5e),this;}['endOfMin'](){const _0x25ffa1={};return _0x25ffa1['second']=0x3b,_0x25ffa1['millisecond']=0x3e7,this.#val=this.#val['with'](_0x25ffa1),this;}['setSeconds'](_0x4ad655){return this.#val=this.#val['with']({'second':a0_0x277385(_0x4ad655)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x38fcef){return this.#val=this.#val['with']({'millisecond':a0_0x277385(_0x38fcef)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x52b4e5){return _0x52b4e5?this.#val=a0_0x4ffe0a['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x52b4e5)['getTime']())['toZonedDateTimeISO'](this['zone']):this.#val=a0_0x4ffe0a['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this;}['setTime'](_0x77fcd2){return this.#val=a0_0x4ffe0a['Temporal']['Instant']['fromEpochMilliseconds'](_0x77fcd2||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0xaf3c25){return this['setIsoDate'](_0xaf3c25?.['toISOString']()),this;}['setDateInputValue'](_0x1e47f4){const _0x5ec8f1=_0x1e47f4?new Date(_0x1e47f4?.['replace']('T','\x20')):new Date();return _0x5ec8f1['getTime']()&&(this.#val=a0_0x4ffe0a['Temporal']['Instant']['fromEpochMilliseconds'](_0x5ec8f1?.['getTime']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x5ec8f1)),this;}['setVal'](_0x53509c){return a0_0x52a30d['new']()['setTime'](a0_0x17c6c9(_0x53509c,this['zone']));}['toIsoDate'](){const _0x55edde={};return _0x55edde['fractionalSecondDigits']=0x3,this.#val['toInstant']()['toString'](_0x55edde);}['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_0x2972aa(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x2972aa(this['month']())+'-'+a0_0x2972aa(this['day']());}['toTimeInput'](_0x1e8035=!![]){const _0x2c7a33=[];return _0x2c7a33['push'](a0_0x2972aa(this['hours']())),_0x2c7a33['push'](a0_0x2972aa(this['min']())),_0x1e8035&&_0x2c7a33['push'](a0_0x2972aa(this['sec']())),_0x2c7a33['join'](':');}['toDateTimeInput'](_0x5c0a62=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x5c0a62);}['toAs'](){return this.#val['toInstant']()['toString']();}['strDate'](){const _0x4beb31={};return _0x4beb31['month']='2-digit',_0x4beb31['day']='2-digit',_0x4beb31['year']='numeric',this.#val['toLocaleString'](this.#_code,_0x4beb31);}['strTime'](){return a0_0x2972aa(this['hours']())+':'+a0_0x2972aa(this['min']())+':'+a0_0x2972aa(this['sec']());}['strHHmm'](){return a0_0x2972aa(this['hours']())+':'+a0_0x2972aa(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0xd7337){return this.#val['toLocaleString'](this.#_code,_0xd7337);}['strYears'](){return this.#val['year']['toString']();}['strMounth'](){return a0_0x2972aa(this['month'](),0x2);}['strDay'](){return a0_0x2972aa(this['day'](),0x2);}['strHour'](){return a0_0x2972aa(this['hours'](),0x2);}['strMin'](){return a0_0x2972aa(this['min'](),0x2);}['strSec'](){return a0_0x2972aa(this['sec'](),0x2);}['strMsec'](){return a0_0x2972aa(this['msec'](),0x2);}['strDayStr'](){return this.#_dyfrmt=a0_0x10e6b5(this),{'ln':()=>this.#_dyfrmt['ln'](),'sh':()=>this.#_dyfrmt['sh'](),'nr':()=>this.#_dyfrmt['nr']()};}['addMonth'](_0x52151f){return this.#val=this.#val['add']({'months':a0_0x277385(_0x52151f)}),this;}['addDay'](_0x4c3305){return this['addHours'](_0x4c3305*0x18),this;}['addHours'](_0x384700){return this['addMins'](_0x384700*0x3c),this;}['addMins'](_0x34b0da){return this['addSecs'](_0x34b0da*0x3c),this;}['addSecs'](_0x3a1ec4){return this['addMilliseconds'](_0x3a1ec4*0x3e8),this;}['addMilliseconds'](_0x9606ae){return this.#val=this.#val['add']({'milliseconds':a0_0x277385(_0x9606ae)}),this;}['startOfDay'](){const _0x244ff2={};return _0x244ff2['hour']=0x0,_0x244ff2['minute']=0x0,_0x244ff2['second']=0x0,_0x244ff2['millisecond']=0x0,this.#val=this.#val['with'](_0x244ff2),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){const _0x586918={};return _0x586918['hour']=0x17,_0x586918['minute']=0x3b,_0x586918['second']=0x3b,_0x586918['millisecond']=0x3e7,this.#val=this.#val['with'](_0x586918),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'](){const _0x478f25={};return _0x478f25['day']=0x1,_0x478f25['hour']=0x0,_0x478f25['minute']=0x0,_0x478f25['second']=0x0,_0x478f25['millisecond']=0x0,this.#val=this.#val['with'](_0x478f25),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){const _0x3e420a=a0_0x4ffe0a['Temporal']['ZonedDateTime']['from'](this.#val),_0x145a82={};_0x145a82['day']=_0x3e420a['daysInMonth'];const _0x26be39={};return _0x26be39['hour']=0x17,_0x26be39['minute']=0x3b,_0x26be39['second']=0x3b,_0x26be39['millisecond']=0x3e7,_0x26be39['microsecond']=0x3e7,_0x26be39['nanosecond']=0x3e7,this.#val=this.#val['with'](_0x145a82)['with'](_0x26be39),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x129fb0){return this['cpy']()['toTime']()===a0_0x17c6c9(_0x129fb0,this['zone']);}['gt'](_0x6edb91){return this['cpy']()['toTime']()>a0_0x17c6c9(_0x6edb91,this['zone']);}['gte'](_0x567eb6){return this['cpy']()['toTime']()>=a0_0x17c6c9(_0x567eb6,this['zone']);}['lt'](_0x3be8b1){return this['cpy']()['toTime']()<a0_0x17c6c9(_0x3be8b1,this['zone']);}['lte'](_0x354348){return this['cpy']()['toTime']()<=a0_0x17c6c9(_0x354348,this['zone']);}['btw'](_0x232fab,_0x97cfe0){const _0x1a62b7=a0_0x17c6c9(_0x232fab,this['zone']),_0x47f340=a0_0x17c6c9(_0x97cfe0,this['zone']),_0x3e0cda=this['cpy']()['toTime']();return _0x1a62b7<_0x3e0cda&&_0x3e0cda<_0x47f340;}['btweq'](_0x4a0abf,_0x426ed7){const _0x28717b=a0_0x17c6c9(_0x4a0abf,this['zone']),_0x4086d6=a0_0x17c6c9(_0x426ed7,this['zone']),_0x90f1c9=this['cpy']()['toTime']();return _0x28717b<=_0x90f1c9&&_0x90f1c9<=_0x4086d6;}['btwEqStart'](_0x147bd0,_0x3e9703){const _0x4213c1=a0_0x17c6c9(_0x147bd0,this['zone']),_0x31463f=a0_0x17c6c9(_0x3e9703,this['zone']),_0x25c69c=this['cpy']()['toTime']();return _0x4213c1<=_0x25c69c&&_0x25c69c<_0x31463f;}['btwEqEnd'](_0x4776be,_0x538d60){const _0x3fefc7=a0_0x17c6c9(_0x4776be,this['zone']),_0x2e6a12=a0_0x17c6c9(_0x538d60,this['zone']),_0x59ede7=this['cpy']()['toTime']();return _0x3fefc7<_0x59ede7&&_0x59ede7<=_0x2e6a12;}['diffDays'](_0x17ecfa,_0x50ad01){const _0x5bd36e=this['toTime'](),_0x19ae73=a0_0x17c6c9(_0x17ecfa,a0_0x26012e);return _0x50ad01?Math['abs'](_0x5bd36e-_0x19ae73)/0x36ee80/0x18:(_0x5bd36e-_0x19ae73)/0x36ee80/0x18;}['diffHours'](_0x35f531,_0xa65513){const _0x2b376a=this['toTime'](),_0xe5efb2=a0_0x17c6c9(_0x35f531,a0_0x26012e);return _0xa65513?Math['abs'](_0x2b376a-_0xe5efb2)/0x36ee80:(_0x2b376a-_0xe5efb2)/0x36ee80;}['diffMins'](_0xc78b93,_0x283c47){const _0x15d516=this['toTime'](),_0x1b7e76=a0_0x17c6c9(_0xc78b93,a0_0x26012e);return _0x283c47?Math['abs'](_0x15d516-_0x1b7e76)/0x3e8/0x3c:(_0x15d516-_0x1b7e76)/0x3e8/0x3c;}['diffSecs'](_0x939e1,_0x1fde02){const _0x17fa4a=this['toTime'](),_0x4ecf45=a0_0x17c6c9(_0x939e1,a0_0x26012e);return _0x1fde02?Math['abs'](_0x17fa4a-_0x4ecf45)/0x3e8:(_0x17fa4a-_0x4ecf45)/0x3e8;}static['diffDays'](_0x3e3bee,_0x2ca350,_0x35882b){const _0x5e647d=a0_0x17c6c9(_0x3e3bee,a0_0x26012e),_0x23997f=a0_0x17c6c9(_0x2ca350,a0_0x26012e);return _0x35882b?Math['abs'](_0x5e647d-_0x23997f)/0x36ee80/0x18:(_0x5e647d-_0x23997f)/0x36ee80/0x18;}static['diffHours'](_0x436e28,_0x613fc4,_0x3b285d){const _0x492f53=a0_0x17c6c9(_0x436e28,a0_0x26012e),_0x564929=a0_0x17c6c9(_0x613fc4,a0_0x26012e);return _0x3b285d?Math['abs'](_0x492f53-_0x564929)/0x36ee80:(_0x492f53-_0x564929)/0x36ee80;}static['diffMins'](_0x4712d6,_0x4461eb,_0x978053){const _0xcb572d=a0_0x17c6c9(_0x4712d6,a0_0x26012e),_0x2467b3=a0_0x17c6c9(_0x4461eb,a0_0x26012e);return _0x978053?Math['abs'](_0xcb572d-_0x2467b3)/0x3e8/0x3c:(_0xcb572d-_0x2467b3)/0x3e8/0x3c;}static['diffSecs'](_0x3a0ef0,_0x4d5a38,_0x66b4ec){const _0xc9fc6f=a0_0x17c6c9(_0x3a0ef0,a0_0x26012e),_0x429a89=a0_0x17c6c9(_0x4d5a38,a0_0x26012e);return _0x66b4ec?Math['abs'](_0xc9fc6f-_0x429a89)/0x3e8:(_0xc9fc6f-_0x429a89)/0x3e8;}static['divideTime'](_0xa921f3){return a0_0x2e0bae(_0xa921f3);}}exports['MDateUtil']=a0_0x52a30d;const a0_0x141554={};a0_0x141554['value']='MDateUtil',a0_0x141554['writable']=![],a0_0x141554['enumerable']=!![],a0_0x141554['configurable']=![],Object['defineProperty'](a0_0x52a30d['prototype'],'idkey',a0_0x141554);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x2609fe=this&&this['__createBinding']||(Object['create']?function(_0x4f834a,_0x2efeaf,_0x328f8,_0x4b6a7c){if(_0x4b6a7c===undefined)_0x4b6a7c=_0x328f8;var _0x395521=Object['getOwnPropertyDescriptor'](_0x2efeaf,_0x328f8);if(!_0x395521||('get'in _0x395521?!_0x2efeaf['__esModule']:_0x395521['writable']||_0x395521['configurable'])){var _0x5754ac={};_0x5754ac['enumerable']=!![],_0x5754ac['get']=function(){return _0x2efeaf[_0x328f8];},_0x395521=_0x5754ac;}Object['defineProperty'](_0x4f834a,_0x4b6a7c,_0x395521);}:function(_0x43e76b,_0x3e421c,_0x4f024a,_0x2f8f5d){if(_0x2f8f5d===undefined)_0x2f8f5d=_0x4f024a;_0x43e76b[_0x2f8f5d]=_0x3e421c[_0x4f024a];}),a0_0x133a9=this&&this['__exportStar']||function(_0x5991fd,_0x3f18b0){for(var _0x501614 in _0x5991fd)if(_0x501614!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x3f18b0,_0x501614))a0_0x2609fe(_0x3f18b0,_0x5991fd,_0x501614);},a0_0x369ac1={};a0_0x369ac1['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x369ac1),a0_0x133a9(require('./DateUtil'),exports);
|