mat-date 1.8.85 → 1.8.90
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.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/DateUtil.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x8d3605={};a0_0x8d3605['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x8d3605),exports['MDateUtil']=void 0x0;const a0_0x47ee6f=require('@js-temporal/polyfill'),a0_0x3e7f42=(_0x3d784a,_0x4bb5bd=0x2)=>_0x3d784a['toString']()['padStart'](_0x4bb5bd,'0');function a0_0x42ad76(_0x2a6ca6,_0x134052){try{return _0x2a6ca6();}catch(_0x1eb104){if(_0x134052)return _0x134052;throw new Error('UNKNOWN');}}function a0_0xed34f5(_0x2374b2,_0x2cd189){try{if(_0x2374b2 instanceof Date)return a0_0x47ee6f['Temporal']['Instant']['fromEpochMilliseconds'](_0x2374b2['getTime']())['toZonedDateTimeISO'](_0x2cd189)['epochMilliseconds'];if(typeof _0x2374b2==='number')return _0x2374b2;if(typeof _0x2374b2==='string')return a0_0x47ee6f['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x2374b2)['getTime']())['toZonedDateTimeISO'](_0x2cd189)['epochMilliseconds'];if(_0x2374b2 instanceof a0_0xfe7ad6)return _0x2374b2['toTime']();if(_0x2374b2['idkey']==='MDateUtil')return _0x2374b2['toTime']();return 0x0;}catch(_0x23f871){throw new Error('ERROR');}}function a0_0x29b562(_0x583545){function _0x3416ca(_0x4f185e){const _0x566095={};return _0x566095['weekday']=_0x4f185e,a0_0x42ad76(()=>new Intl['DateTimeFormat'](_0x583545['localCode'],_0x566095)['format'](a0_0xed34f5(_0x583545,_0x583545['zone'])),'');}function _0x4a21f5(){return _0x3416ca('long');}function _0x174335(){return _0x3416ca('short');}function _0x1745c1(){return _0x3416ca('narrow');}const _0xd61b3b={};return _0xd61b3b['ln']=_0x4a21f5,_0xd61b3b['sh']=_0x174335,_0xd61b3b['nr']=_0x1745c1,_0xd61b3b;}function a0_0x599c32(_0x2f57a7){let _0x4712a6=undefined,_0x157138=undefined,_0x2cf1b6=undefined,_0x316784=undefined;try{const _0x56bf9f=(_0x2f57a7||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x4712a6=_0x56bf9f['length']>=0x1?Number(_0x56bf9f[0x0]):undefined,_0x157138=_0x56bf9f['length']>=0x2?Number(_0x56bf9f[0x1]):undefined,_0x2cf1b6=_0x56bf9f['length']>=0x3?Number(_0x56bf9f[0x2]):undefined;}catch(_0x3c9ea8){}try{let _0x5d5f9c=_0x2f57a7||'',_0x590f2a=/\.\d{3}/g,_0x558aa2=_0x5d5f9c['match'](_0x590f2a)[0x0]['split']('.')['filter'](_0xab0922=>Boolean(_0xab0922));_0x316784=_0x558aa2['length']>=0x1?Number(_0x558aa2[0x0]):undefined;}catch(_0x46e70e){}const _0x1ffb0a={};return _0x1ffb0a['h']=_0x4712a6,_0x1ffb0a['m']=_0x157138,_0x1ffb0a['s']=_0x2cf1b6,_0x1ffb0a['ms']=_0x316784,_0x1ffb0a;}let a0_0x475115=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x58e7a2=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];class a0_0xfe7ad6{['val'];['_code']=Intl['NumberFormat']()['resolvedOptions']()['locale'];['_zone']=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];['dyfrmt']=a0_0x29b562(this);get['localCode'](){return this['_code'];}get['zone'](){return this['_zone'];}['with'](_0x41196e){this['val']=this['val']['with']({'year':_0x41196e['getFullYear'](),'month':_0x41196e['getMonth']()+0x1,'day':_0x41196e['getDate'](),'hour':_0x41196e['getHours'](),'minute':_0x41196e['getMinutes'](),'second':_0x41196e['getSeconds'](),'millisecond':_0x41196e['getMilliseconds']()});}['init'](){const _0x5945c6=new Date();return this['val']=a0_0x47ee6f['Temporal']['Instant']['from'](_0x5945c6['toISOString']())['toZonedDateTimeISO'](this['zone']),this['dyfrmt']=a0_0x29b562(this),this;}['toString'](){return'---';}static['new'](){return new a0_0xfe7ad6()['setCode'](a0_0x475115)['setZone'](a0_0x58e7a2)['init']();}static['setCode'](_0x19b7b0){return a0_0x475115=_0x19b7b0,this;}static['setZone'](_0x296919){return a0_0x58e7a2=_0x296919,this;}static['seperator'](){return a0_0x42ad76(()=>new Date()['toLocaleDateString'](a0_0x475115)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x42ad76(()=>a0_0xfe7ad6['new']()['setTime'](this['toTime']()));}['setCode'](_0x47c92b){return this['_code']=_0x47c92b,this;}['setZone'](_0x4fbd93){return this['_zone']=_0x4fbd93,this;}['seperator'](){return a0_0x42ad76(()=>new Date()['toLocaleDateString'](this['_code'])['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x42ad76(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x2037d=this['_code']){return a0_0x42ad76(()=>{return new Intl['Locale'](_0x2037d)?.['timeZones']||[];},null);}['region'](_0x429bc0=this['_code']){return a0_0x42ad76(()=>{return new Intl['Locale'](_0x429bc0)['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 _0x29109a=this['val']['dayOfWeek'];return _0x29109a?_0x29109a:0x7;}['dayOfWeekUtc'](){return this['val']['dayOfWeek']-0x1;}['setYear'](_0x236309){const _0x55e1b4={};return _0x55e1b4['year']=_0x236309,this['val']=this['val']['with'](_0x55e1b4),this;}['setMonth'](_0x4330fd){const _0x227ff7={};return _0x227ff7['month']=_0x4330fd,this['val']=this['val']['with'](_0x227ff7),this;}['setMonthUtc'](_0xe98413){const _0x10478e={};return _0x10478e['month']=_0xe98413+0x1,this['val']=this['val']['with'](_0x10478e),this;}['setDay'](_0xebaae3){const _0xb12e86={};return _0xb12e86['day']=_0xebaae3,this['val']=this['val']['with'](_0xb12e86),this;}['setHour'](_0x14a04c){const _0x367ba9={};return _0x367ba9['hour']=_0x14a04c,this['val']=this['val']['with'](_0x367ba9),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'](_0x5539f1){const _0x353429={};return _0x353429['minute']=_0x5539f1,this['val']=this['val']['with'](_0x353429),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x177380){const _0x46f004={};return _0x46f004['second']=_0x177380,this['val']=this['val']['with'](_0x46f004),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x577136){const _0x3e91ce={};return _0x3e91ce['millisecond']=_0x577136,this['val']=this['val']['with'](_0x3e91ce),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x186db4){const _0x25f0cd=_0x186db4?new Date(_0x186db4?.['replace']('T','\x20')):new Date();return this['val']=a0_0x47ee6f['Temporal']['Instant']['from'](_0x25f0cd['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x41af13){return this['val']=a0_0x47ee6f['Temporal']['Instant']['fromEpochMilliseconds'](_0x41af13||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x3e1ebf){return this['setIsoDate'](_0x3e1ebf?.['toISOString']()),this;}['setDateInputValue'](_0x2c5534){const _0x26e122=_0x2c5534?new Date(_0x2c5534?.['replace']('T','\x20')):new Date();return _0x26e122['getTime']()&&(this['val']=a0_0x47ee6f['Temporal']['Instant']['from'](_0x26e122?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x26e122)),this;}['setVal'](_0x199461){return a0_0x42ad76(()=>{return a0_0xfe7ad6['new']()['setTime'](a0_0xed34f5(_0x199461,this['zone']));});}['toIsoDate'](){return this['val']['toInstant']()['toString']();}['toIsoDateZone'](){return this['val']['toString']()['substring'](0x0,0x1d)+'Z';}['toTime'](){return this['val']['epochMilliseconds'];}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x3e7f42(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x3e7f42(this['month']())+'-'+a0_0x3e7f42(this['day']());}['toTimeInput'](_0x121dc5=!![]){const _0x12395e=[];return _0x12395e['push'](a0_0x3e7f42(this['hours']())),_0x12395e['push'](a0_0x3e7f42(this['min']())),_0x121dc5&&_0x12395e['push'](a0_0x3e7f42(this['sec']())),_0x12395e['join'](':');}['toDateTimeInput'](_0x5e48e4=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x5e48e4);}['toAs'](){return this['val']['toInstant']()['toString']();}['strDate'](){const _0x1af4ab={};return _0x1af4ab['month']='2-digit',_0x1af4ab['day']='2-digit',_0x1af4ab['year']='numeric',this['val']['toLocaleString'](this['_code'],_0x1af4ab);}['strTime'](){return a0_0x3e7f42(this['hours']())+':'+a0_0x3e7f42(this['min']())+':'+a0_0x3e7f42(this['sec']());}['strHHmm'](){return a0_0x3e7f42(this['hours']())+':'+a0_0x3e7f42(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x1f3c62){return this['val']['toLocaleString'](this['_code'],_0x1f3c62);}['strYears'](){return this['val']['year']['toString']();}['strMounth'](){return a0_0x3e7f42(this['month'](),0x2);}['strDay'](){return a0_0x3e7f42(this['day'](),0x2);}['strHour'](){return a0_0x3e7f42(this['hours'](),0x2);}['strMin'](){return a0_0x3e7f42(this['min'](),0x2);}['strSec'](){return a0_0x3e7f42(this['sec'](),0x2);}['strMsec'](){return a0_0x3e7f42(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addDay'](_0x2373cc){const _0x3d3de2={};return _0x3d3de2['days']=_0x2373cc,this['val']=this['val']['add'](_0x3d3de2),this;}['addHours'](_0x304621){const _0x274a66={};return _0x274a66['hours']=_0x304621,this['val']=this['val']['add'](_0x274a66),this;}['addMins'](_0x2b0d75){const _0x21422f={};return _0x21422f['minutes']=_0x2b0d75,this['val']=this['val']['add'](_0x21422f),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']()['setMonth'](this['month']()+0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x4e5763){return a0_0x42ad76(()=>{return this['cpy']()['toTime']()===a0_0xed34f5(_0x4e5763,this['zone']);});}['gt'](_0x1724fb){return a0_0x42ad76(()=>{return this['cpy']()['toTime']()>a0_0xed34f5(_0x1724fb,this['zone']);});}['gte'](_0x40a201){return a0_0x42ad76(()=>{return this['cpy']()['toTime']()>=a0_0xed34f5(_0x40a201,this['zone']);});}['lt'](_0x47651d){return a0_0x42ad76(()=>{return this['cpy']()['toTime']()<a0_0xed34f5(_0x47651d,this['zone']);});}['lte'](_0x2130ec){return a0_0x42ad76(()=>{return this['cpy']()['toTime']()<=a0_0xed34f5(_0x2130ec,this['zone']);});}['btw'](_0x670e8b,_0xe3f59b){return a0_0x42ad76(()=>{const _0x1c8533=a0_0xed34f5(_0x670e8b,this['zone']),_0x5505f4=a0_0xed34f5(_0xe3f59b,this['zone']),_0x110144=this['cpy']()['toTime']();return _0x1c8533<_0x110144&&_0x110144<_0x5505f4;});}['btweq'](_0x227865,_0x123232){return a0_0x42ad76(()=>{const _0x320a05=a0_0xed34f5(_0x227865,this['zone']),_0x33a47a=a0_0xed34f5(_0x123232,this['zone']),_0x42602e=this['cpy']()['toTime']();return _0x320a05<=_0x42602e&&_0x42602e<=_0x33a47a;});}['btwEqStart'](_0x2a444c,_0x6986bc){return a0_0x42ad76(()=>{const _0x3c8e32=a0_0xed34f5(_0x2a444c,this['zone']),_0x4fd507=a0_0xed34f5(_0x6986bc,this['zone']),_0x452e2d=this['cpy']()['toTime']();return _0x3c8e32<=_0x452e2d&&_0x452e2d<_0x4fd507;});}['btwEqEnd'](_0x5377e7,_0x3d855f){return a0_0x42ad76(()=>{const _0x2e9a5f=a0_0xed34f5(_0x5377e7,this['zone']),_0x67c62b=a0_0xed34f5(_0x3d855f,this['zone']),_0x83b19f=this['cpy']()['toTime']();return _0x2e9a5f<_0x83b19f&&_0x83b19f<=_0x67c62b;});}static['diffDays'](_0x555af9,_0x554c23,_0x1c9b63){return a0_0x42ad76(()=>{const _0x483894=a0_0xed34f5(_0x555af9,a0_0x58e7a2),_0x521878=a0_0xed34f5(_0x554c23,a0_0x58e7a2);return _0x1c9b63?Math['abs'](_0x483894-_0x521878)/0x36ee80/0x18:(_0x483894-_0x521878)/0x36ee80/0x18;});}static['diffHours'](_0x4b0aa1,_0x213cfb,_0x2b169b){return a0_0x42ad76(()=>{const _0x3c978c=a0_0xed34f5(_0x4b0aa1,a0_0x58e7a2),_0x27f9fd=a0_0xed34f5(_0x213cfb,a0_0x58e7a2);return _0x2b169b?Math['abs'](_0x3c978c-_0x27f9fd)/0x36ee80:(_0x3c978c-_0x27f9fd)/0x36ee80;});}static['diffMins'](_0x467dec,_0x3700f5,_0x12849f){return a0_0x42ad76(()=>{const _0x4fc4ef=a0_0xed34f5(_0x467dec,a0_0x58e7a2),_0x470ae8=a0_0xed34f5(_0x3700f5,a0_0x58e7a2);return _0x12849f?Math['abs'](_0x4fc4ef-_0x470ae8)/0x3e8/0x3c:(_0x4fc4ef-_0x470ae8)/0x3e8/0x3c;});}static['diffSecs'](_0x10444e,_0x6fd516,_0x1845d2){return a0_0x42ad76(()=>{const _0x2523ba=a0_0xed34f5(_0x10444e,a0_0x58e7a2),_0x1d08eb=a0_0xed34f5(_0x6fd516,a0_0x58e7a2);return _0x1845d2?Math['abs'](_0x2523ba-_0x1d08eb)/0x3e8:(_0x2523ba-_0x1d08eb)/0x3e8;});}static['divideTime'](_0x41dd3b){return a0_0x42ad76(()=>a0_0x599c32(_0x41dd3b));}}exports['MDateUtil']=a0_0xfe7ad6;const a0_0xbd0c09={};a0_0xbd0c09['value']='MDateUtil',a0_0xbd0c09['writable']=![],a0_0xbd0c09['enumerable']=!![],a0_0xbd0c09['configurable']=![],Object['defineProperty'](a0_0xfe7ad6['prototype'],'idkey',a0_0xbd0c09);
|
|
1
|
+
'use strict';const a0_0x3d32f3={};a0_0x3d32f3['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x3d32f3),exports['MDateUtil']=void 0x0;const a0_0x345918=require('@js-temporal/polyfill'),a0_0x3700da=(_0xc7e9c5,_0x397d7a=0x2)=>_0xc7e9c5['toString']()['padStart'](_0x397d7a,'0');function a0_0x4fd849(_0x2484e3,_0x2a64fd){try{return _0x2484e3();}catch(_0x2d8924){if(_0x2a64fd)return _0x2a64fd;throw new Error('UNKNOWN');}}function a0_0x3d150e(_0x3e95dd,_0x22072a){try{if(_0x3e95dd instanceof Date)return a0_0x345918['Temporal']['Instant']['fromEpochMilliseconds'](_0x3e95dd['getTime']())['toZonedDateTimeISO'](_0x22072a)['epochMilliseconds'];if(typeof _0x3e95dd==='number')return _0x3e95dd;if(typeof _0x3e95dd==='string')return a0_0x345918['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x3e95dd)['getTime']())['toZonedDateTimeISO'](_0x22072a)['epochMilliseconds'];if(_0x3e95dd instanceof a0_0x472948)return _0x3e95dd['toTime']();if(_0x3e95dd['idkey']==='MDateUtil')return _0x3e95dd['toTime']();return 0x0;}catch(_0x491322){throw new Error('ERROR');}}function a0_0x493c03(_0x4f115e){function _0x1d95e5(_0x584a43){const _0x4974d4={};return _0x4974d4['weekday']=_0x584a43,a0_0x4fd849(()=>new Intl['DateTimeFormat'](_0x4f115e['localCode'],_0x4974d4)['format'](a0_0x3d150e(_0x4f115e,_0x4f115e['zone'])),'');}function _0x46ff7c(){return _0x1d95e5('long');}function _0x9e5af2(){return _0x1d95e5('short');}function _0x105532(){return _0x1d95e5('narrow');}const _0x1276ef={};return _0x1276ef['ln']=_0x46ff7c,_0x1276ef['sh']=_0x9e5af2,_0x1276ef['nr']=_0x105532,_0x1276ef;}function a0_0x1decaa(_0x48f671){let _0x542d54=undefined,_0x3f7aa5=undefined,_0x16cf3d=undefined,_0x42b71f=undefined;try{const _0x2908b8=(_0x48f671||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x542d54=_0x2908b8['length']>=0x1?Number(_0x2908b8[0x0]):undefined,_0x3f7aa5=_0x2908b8['length']>=0x2?Number(_0x2908b8[0x1]):undefined,_0x16cf3d=_0x2908b8['length']>=0x3?Number(_0x2908b8[0x2]):undefined;}catch(_0x5d177e){}try{let _0x1065c8=_0x48f671||'',_0x1dfa14=/\.\d{3}/g,_0xce4368=_0x1065c8['match'](_0x1dfa14)[0x0]['split']('.')['filter'](_0x52aec5=>Boolean(_0x52aec5));_0x42b71f=_0xce4368['length']>=0x1?Number(_0xce4368[0x0]):undefined;}catch(_0x4650b9){}const _0x425350={};return _0x425350['h']=_0x542d54,_0x425350['m']=_0x3f7aa5,_0x425350['s']=_0x16cf3d,_0x425350['ms']=_0x42b71f,_0x425350;}let a0_0x2d5c56=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x4ef52e=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];class a0_0x472948{['val'];['_code']=Intl['NumberFormat']()['resolvedOptions']()['locale'];['_zone']=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];['dyfrmt']=a0_0x493c03(this);get['localCode'](){return this['_code'];}get['zone'](){return this['_zone'];}['with'](_0x3c46aa){this['val']=this['val']['with']({'year':_0x3c46aa['getFullYear'](),'month':_0x3c46aa['getMonth']()+0x1,'day':_0x3c46aa['getDate'](),'hour':_0x3c46aa['getHours'](),'minute':_0x3c46aa['getMinutes'](),'second':_0x3c46aa['getSeconds'](),'millisecond':_0x3c46aa['getMilliseconds']()});}['init'](){const _0x4eafe8=new Date();return this['val']=a0_0x345918['Temporal']['Instant']['from'](_0x4eafe8['toISOString']())['toZonedDateTimeISO'](this['zone']),this['dyfrmt']=a0_0x493c03(this),this;}['toString'](){return'---';}static['new'](){return new a0_0x472948()['setCode'](a0_0x2d5c56)['setZone'](a0_0x4ef52e)['init']();}static['setCode'](_0x5e32e1){return a0_0x2d5c56=_0x5e32e1,this;}static['setZone'](_0x1ab9aa){return a0_0x4ef52e=_0x1ab9aa,this;}static['seperator'](){return a0_0x4fd849(()=>new Date()['toLocaleDateString'](a0_0x2d5c56)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x4fd849(()=>a0_0x472948['new']()['setTime'](this['toTime']()));}['setCode'](_0x56c738){return this['_code']=_0x56c738,this;}['setZone'](_0x19e589){return this['_zone']=_0x19e589,this;}['seperator'](){return a0_0x4fd849(()=>new Date()['toLocaleDateString'](this['_code'])['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x4fd849(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x554f39=this['_code']){return a0_0x4fd849(()=>{return new Intl['Locale'](_0x554f39)?.['timeZones']||[];},null);}['region'](_0x133ab2=this['_code']){return a0_0x4fd849(()=>{return new Intl['Locale'](_0x133ab2)['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 _0x25daef=this['val']['dayOfWeek'];return _0x25daef?_0x25daef:0x7;}['dayOfWeekUtc'](){return this['val']['dayOfWeek']-0x1;}['setYear'](_0xa3787){const _0x4f83a5={};return _0x4f83a5['year']=_0xa3787,this['val']=this['val']['with'](_0x4f83a5),this;}['setMonth'](_0x4b3d19){const _0xcef71e={};return _0xcef71e['month']=_0x4b3d19,this['val']=this['val']['with'](_0xcef71e),this;}['setMonthUtc'](_0x2b0a63){const _0x225c53={};return _0x225c53['month']=_0x2b0a63+0x1,this['val']=this['val']['with'](_0x225c53),this;}['setDay'](_0x51ba7e){const _0x4f314e={};return _0x4f314e['day']=_0x51ba7e,this['val']=this['val']['with'](_0x4f314e),this;}['setHour'](_0x461d74){const _0x1cd88c={};return _0x1cd88c['hour']=_0x461d74,this['val']=this['val']['with'](_0x1cd88c),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'](_0x59acb1){const _0x35cf5b={};return _0x35cf5b['minute']=_0x59acb1,this['val']=this['val']['with'](_0x35cf5b),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x58ad9e){const _0x23c2d1={};return _0x23c2d1['second']=_0x58ad9e,this['val']=this['val']['with'](_0x23c2d1),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0xfa18a3){const _0x154092={};return _0x154092['millisecond']=_0xfa18a3,this['val']=this['val']['with'](_0x154092),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x7541c7){const _0x186a80=_0x7541c7?new Date(_0x7541c7?.['replace']('T','\x20')):new Date();return this['val']=a0_0x345918['Temporal']['Instant']['from'](_0x186a80['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x326b7d){return this['val']=a0_0x345918['Temporal']['Instant']['fromEpochMilliseconds'](_0x326b7d||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x5ba194){return this['setIsoDate'](_0x5ba194?.['toISOString']()),this;}['setDateInputValue'](_0x5f1065){const _0x44e5d3=_0x5f1065?new Date(_0x5f1065?.['replace']('T','\x20')):new Date();return _0x44e5d3['getTime']()&&(this['val']=a0_0x345918['Temporal']['Instant']['from'](_0x44e5d3?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x44e5d3)),this;}['setVal'](_0x539f29){return a0_0x4fd849(()=>{return a0_0x472948['new']()['setTime'](a0_0x3d150e(_0x539f29,this['zone']));});}['toIsoDate'](){return this['val']['toInstant']()['toString']();}['toIsoDateZone'](){return this['val']['toString']()['substring'](0x0,0x1d)+'Z';}['toTime'](){return this['val']['epochMilliseconds'];}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x3700da(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x3700da(this['month']())+'-'+a0_0x3700da(this['day']());}['toTimeInput'](_0x19b273=!![]){const _0xdf4832=[];return _0xdf4832['push'](a0_0x3700da(this['hours']())),_0xdf4832['push'](a0_0x3700da(this['min']())),_0x19b273&&_0xdf4832['push'](a0_0x3700da(this['sec']())),_0xdf4832['join'](':');}['toDateTimeInput'](_0xdc06b1=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0xdc06b1);}['toAs'](){return this['val']['toInstant']()['toString']();}['strDate'](){const _0x4befe4={};return _0x4befe4['month']='2-digit',_0x4befe4['day']='2-digit',_0x4befe4['year']='numeric',this['val']['toLocaleString'](this['_code'],_0x4befe4);}['strTime'](){return a0_0x3700da(this['hours']())+':'+a0_0x3700da(this['min']())+':'+a0_0x3700da(this['sec']());}['strHHmm'](){return a0_0x3700da(this['hours']())+':'+a0_0x3700da(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x57e941){return this['val']['toLocaleString'](this['_code'],_0x57e941);}['strYears'](){return this['val']['year']['toString']();}['strMounth'](){return a0_0x3700da(this['month'](),0x2);}['strDay'](){return a0_0x3700da(this['day'](),0x2);}['strHour'](){return a0_0x3700da(this['hours'](),0x2);}['strMin'](){return a0_0x3700da(this['min'](),0x2);}['strSec'](){return a0_0x3700da(this['sec'](),0x2);}['strMsec'](){return a0_0x3700da(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addDay'](_0x398c7c){const _0x37812c={};return _0x37812c['days']=_0x398c7c,this['val']=this['val']['add'](_0x37812c),this;}['addHours'](_0x944f00){const _0xdee349={};return _0xdee349['hours']=_0x944f00,this['val']=this['val']['add'](_0xdee349),this;}['addMins'](_0x42f363){const _0x665a7c={};return _0x665a7c['minutes']=_0x42f363,this['val']=this['val']['add'](_0x665a7c),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']()['setMonth'](this['month']()+0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x87cd76){return a0_0x4fd849(()=>{return this['cpy']()['toTime']()===a0_0x3d150e(_0x87cd76,this['zone']);});}['gt'](_0x1dc5de){return a0_0x4fd849(()=>{return this['cpy']()['toTime']()>a0_0x3d150e(_0x1dc5de,this['zone']);});}['gte'](_0x394ff0){return a0_0x4fd849(()=>{return this['cpy']()['toTime']()>=a0_0x3d150e(_0x394ff0,this['zone']);});}['lt'](_0x1a07a7){return a0_0x4fd849(()=>{return this['cpy']()['toTime']()<a0_0x3d150e(_0x1a07a7,this['zone']);});}['lte'](_0x516bd6){return a0_0x4fd849(()=>{return this['cpy']()['toTime']()<=a0_0x3d150e(_0x516bd6,this['zone']);});}['btw'](_0x3349e1,_0x2ccc82){return a0_0x4fd849(()=>{const _0xbcef6c=a0_0x3d150e(_0x3349e1,this['zone']),_0x1323f2=a0_0x3d150e(_0x2ccc82,this['zone']),_0x209d48=this['cpy']()['toTime']();return _0xbcef6c<_0x209d48&&_0x209d48<_0x1323f2;});}['btweq'](_0x27a0b6,_0x3fc430){return a0_0x4fd849(()=>{const _0x18112a=a0_0x3d150e(_0x27a0b6,this['zone']),_0x3393d2=a0_0x3d150e(_0x3fc430,this['zone']),_0x28dfd0=this['cpy']()['toTime']();return _0x18112a<=_0x28dfd0&&_0x28dfd0<=_0x3393d2;});}['btwEqStart'](_0xdc0a48,_0x36655e){return a0_0x4fd849(()=>{const _0x4c8566=a0_0x3d150e(_0xdc0a48,this['zone']),_0x11c0af=a0_0x3d150e(_0x36655e,this['zone']),_0x528bf6=this['cpy']()['toTime']();return _0x4c8566<=_0x528bf6&&_0x528bf6<_0x11c0af;});}['btwEqEnd'](_0x580e9c,_0x5eef4e){return a0_0x4fd849(()=>{const _0x1322cb=a0_0x3d150e(_0x580e9c,this['zone']),_0x9faaed=a0_0x3d150e(_0x5eef4e,this['zone']),_0x10d8aa=this['cpy']()['toTime']();return _0x1322cb<_0x10d8aa&&_0x10d8aa<=_0x9faaed;});}static['diffDays'](_0x216897,_0x234363,_0x184f70){return a0_0x4fd849(()=>{const _0x26daf7=a0_0x3d150e(_0x216897,a0_0x4ef52e),_0x485bcd=a0_0x3d150e(_0x234363,a0_0x4ef52e);return _0x184f70?Math['abs'](_0x26daf7-_0x485bcd)/0x36ee80/0x18:(_0x26daf7-_0x485bcd)/0x36ee80/0x18;});}static['diffHours'](_0x3d8eed,_0xbb9650,_0x28b3ea){return a0_0x4fd849(()=>{const _0x30e763=a0_0x3d150e(_0x3d8eed,a0_0x4ef52e),_0x161f91=a0_0x3d150e(_0xbb9650,a0_0x4ef52e);return _0x28b3ea?Math['abs'](_0x30e763-_0x161f91)/0x36ee80:(_0x30e763-_0x161f91)/0x36ee80;});}static['diffMins'](_0x3d12bc,_0x17a4d2,_0x475855){return a0_0x4fd849(()=>{const _0x1a86ee=a0_0x3d150e(_0x3d12bc,a0_0x4ef52e),_0x218bfa=a0_0x3d150e(_0x17a4d2,a0_0x4ef52e);return _0x475855?Math['abs'](_0x1a86ee-_0x218bfa)/0x3e8/0x3c:(_0x1a86ee-_0x218bfa)/0x3e8/0x3c;});}static['diffSecs'](_0x37d715,_0x50a834,_0x2b36aa){return a0_0x4fd849(()=>{const _0x57c5ac=a0_0x3d150e(_0x37d715,a0_0x4ef52e),_0x2c58be=a0_0x3d150e(_0x50a834,a0_0x4ef52e);return _0x2b36aa?Math['abs'](_0x57c5ac-_0x2c58be)/0x3e8:(_0x57c5ac-_0x2c58be)/0x3e8;});}static['divideTime'](_0x428b38){return a0_0x4fd849(()=>a0_0x1decaa(_0x428b38));}}exports['MDateUtil']=a0_0x472948;const a0_0x1e4f34={};a0_0x1e4f34['value']='MDateUtil',a0_0x1e4f34['writable']=![],a0_0x1e4f34['enumerable']=!![],a0_0x1e4f34['configurable']=![],Object['defineProperty'](a0_0x472948['prototype'],'idkey',a0_0x1e4f34);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x50eaaf=this&&this['__createBinding']||(Object['create']?function(_0x349974,_0x11649e,_0x132195,_0x501671){if(_0x501671===undefined)_0x501671=_0x132195;var _0x2d6718=Object['getOwnPropertyDescriptor'](_0x11649e,_0x132195);if(!_0x2d6718||('get'in _0x2d6718?!_0x11649e['__esModule']:_0x2d6718['writable']||_0x2d6718['configurable'])){var _0x13f390={};_0x13f390['enumerable']=!![],_0x13f390['get']=function(){return _0x11649e[_0x132195];},_0x2d6718=_0x13f390;}Object['defineProperty'](_0x349974,_0x501671,_0x2d6718);}:function(_0x410ed0,_0x386bf5,_0x26bf81,_0x3a006a){if(_0x3a006a===undefined)_0x3a006a=_0x26bf81;_0x410ed0[_0x3a006a]=_0x386bf5[_0x26bf81];}),a0_0xf37f6a=this&&this['__exportStar']||function(_0x110769,_0x1508f0){for(var _0x5eca1b in _0x110769)if(_0x5eca1b!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x1508f0,_0x5eca1b))a0_0x50eaaf(_0x1508f0,_0x110769,_0x5eca1b);},a0_0x1fdb89={};a0_0x1fdb89['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x1fdb89),a0_0xf37f6a(require('./DateUtil'),exports);
|