mat-date 1.15.25 → 1.15.75
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 +2 -2
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_0x2f9fd3={};a0_0x2f9fd3['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x2f9fd3),exports['MDateUtil']=void 0x0;const a0_0x2667aa=require('temporal-polyfill'),a0_0x2b0797=(_0x23cf4c,_0x1b79ee=0x2)=>_0x23cf4c['toString']()['padStart'](_0x1b79ee,'0');function a0_0x23cc65(_0x29b206,_0x582a73){try{return _0x29b206();}catch(_0xe60d95){if(_0x582a73)return _0x582a73;throw new Error('UNKNOWN');}}function a0_0x4502ac(_0x343f99,_0xf0ca94){try{if(_0x343f99 instanceof Date)return a0_0x2667aa['Temporal']['Instant']['fromEpochMilliseconds'](_0x343f99['getTime']())['toZonedDateTimeISO'](_0xf0ca94)['epochMilliseconds'];if(typeof _0x343f99==='number')return _0x343f99;if(typeof _0x343f99==='string')return a0_0x2667aa['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x343f99)['getTime']())['toZonedDateTimeISO'](_0xf0ca94)['epochMilliseconds'];if(_0x343f99 instanceof a0_0x3b4d22)return _0x343f99['toTime']();if(_0x343f99['idkey']==='MDateUtil')return _0x343f99['toTime']();return 0x0;}catch(_0x1337b8){throw new Error('ERROR');}}function a0_0x41f58f(_0x5bca38){function _0x2ec2a7(_0xc978c){const _0x10e8f3={};return _0x10e8f3['weekday']=_0xc978c,a0_0x23cc65(()=>new Intl['DateTimeFormat'](_0x5bca38['localCode'],_0x10e8f3)['format'](a0_0x4502ac(_0x5bca38,_0x5bca38['zone'])),'');}function _0x4d1c3b(){return _0x2ec2a7('long');}function _0x163d2b(){return _0x2ec2a7('short');}function _0x37fc88(){return _0x2ec2a7('narrow');}const _0x5d7f23={};return _0x5d7f23['ln']=_0x4d1c3b,_0x5d7f23['sh']=_0x163d2b,_0x5d7f23['nr']=_0x37fc88,_0x5d7f23;}function a0_0x530287(_0x216331=''){const _0x2bc103={};_0x2bc103['h']=undefined,_0x2bc103['m']=undefined,_0x2bc103['s']=undefined,_0x2bc103['ms']=undefined;const _0x48a465=_0x2bc103,_0x424ca2=_0x216331['match'](/\b\d{1,2}:\d{2}(?::\d{2})?\b/);if(_0x424ca2?.[0x0]){const [_0x46b4c5,_0xbdba41,_0x52cfdc]=_0x424ca2[0x0]['split'](':')['map'](Number);_0x48a465['h']=_0x46b4c5,_0x48a465['m']=_0xbdba41,_0x48a465['s']=_0x52cfdc;}const _0x4057ff=_0x216331['match'](/\.(\d{1,3})/);return _0x4057ff?.[0x1]&&(_0x48a465['ms']=Number(_0x4057ff[0x1]['padEnd'](0x3,'0'))),_0x48a465;}let a0_0x317ee5=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x4fb016=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x52b0c2(_0x12c43a){return Math['floor'](_0x12c43a)||0x0;}class a0_0x3b4d22{#val;#_code=a0_0x317ee5;#_zone=a0_0x4fb016;#dyfrmt=a0_0x41f58f(this);get['localCode'](){return this.#_code;}get['zone'](){return this.#_zone;}['with'](_0x322bc5){this.#val=this.#val['with']({'year':_0x322bc5['getFullYear'](),'month':_0x322bc5['getMonth']()+0x1,'day':_0x322bc5['getDate'](),'hour':_0x322bc5['getHours'](),'minute':_0x322bc5['getMinutes'](),'second':_0x322bc5['getSeconds'](),'millisecond':_0x322bc5['getMilliseconds']()});}['init'](){return this.#val=a0_0x2667aa['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this.#dyfrmt=a0_0x41f58f(this),this;}['toString'](){return'---';}static['new'](){return new a0_0x3b4d22()['setCode'](a0_0x317ee5)['setZone'](a0_0x4fb016)['init']();}static['setCode'](_0x38906d){return a0_0x317ee5=_0x38906d,this;}static['setZone'](_0x362a82){return a0_0x4fb016=_0x362a82,this;}static['seperator'](){return a0_0x23cc65(()=>new Date()['toLocaleDateString'](a0_0x317ee5)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x3b4d22['new']()['setTime'](this['toTime']());}['setCode'](_0x49f481){return this.#_code=_0x49f481,this;}['setZone'](_0x8f4f38){return this.#_zone=_0x8f4f38,this;}['seperator'](){return a0_0x23cc65(()=>new Date()['toLocaleDateString'](this.#_code)['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x23cc65(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x303543=this.#_code){return a0_0x23cc65(()=>{return new Intl['Locale'](_0x303543)?.['timeZones']||[];},null);}['region'](_0x54352a=this.#_code){return a0_0x23cc65(()=>{return new Intl['Locale'](_0x54352a)['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 _0x100168=this.#val['dayOfWeek'];return _0x100168?_0x100168:0x7;}['dayOfWeekUtc'](){return this.#val['dayOfWeek']-0x1;}['setYear'](_0x5b4b4c){return this.#val=this.#val['with']({'year':a0_0x52b0c2(_0x5b4b4c)}),this;}['setMonth'](_0x1e31f2){return this.#val=this.#val['with']({'month':a0_0x52b0c2(_0x1e31f2)}),this;}['setMonthUtc'](_0x89ef11){return this.#val=this.#val['with']({'month':a0_0x52b0c2(_0x89ef11)+0x1}),this;}['setDay'](_0x296600){return this.#val=this.#val['with']({'day':a0_0x52b0c2(_0x296600)}),this;}['setHour'](_0x1b1d64){return this.#val=this.#val['with']({'hour':a0_0x52b0c2(_0x1b1d64)}),this;}['startOfHours'](){const _0xc3f369={};return _0xc3f369['minute']=0x0,_0xc3f369['second']=0x0,_0xc3f369['millisecond']=0x0,this.#val=this.#val['with'](_0xc3f369),this;}['endOfHours'](){const _0x579863={};return _0x579863['minute']=0x3b,_0x579863['second']=0x3b,_0x579863['millisecond']=0x3e7,this.#val=this.#val['with'](_0x579863),this;}['setMin'](_0x1b3722){return this.#val=this.#val['with']({'minute':a0_0x52b0c2(_0x1b3722)}),this;}['startOfMin'](){const _0x1b8bf2={};return _0x1b8bf2['second']=0x0,_0x1b8bf2['millisecond']=0x0,this.#val=this.#val['with'](_0x1b8bf2),this;}['endOfMin'](){const _0x100bff={};return _0x100bff['second']=0x3b,_0x100bff['millisecond']=0x3e7,this.#val=this.#val['with'](_0x100bff),this;}['setSeconds'](_0x413b25){return this.#val=this.#val['with']({'second':a0_0x52b0c2(_0x413b25)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x537519){return this.#val=this.#val['with']({'millisecond':a0_0x52b0c2(_0x537519)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x14967d){return _0x14967d?this.#val=a0_0x2667aa['Temporal']['Instant']['from'](new Date(_0x14967d)['toISOString']())['toZonedDateTimeISO'](this['zone']):this.#val=a0_0x2667aa['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this;}['setTime'](_0x23e459){return this.#val=a0_0x2667aa['Temporal']['Instant']['fromEpochMilliseconds'](_0x23e459||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x7088b5){return this['setIsoDate'](_0x7088b5?.['toISOString']()),this;}['setDateInputValue'](_0x42881b){const _0x2ce27a=_0x42881b?new Date(_0x42881b?.['replace']('T','\x20')):new Date();return _0x2ce27a['getTime']()&&(this.#val=a0_0x2667aa['Temporal']['Instant']['from'](_0x2ce27a?.['toISOString']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x2ce27a)),this;}['setVal'](_0x15630f){return a0_0x3b4d22['new']()['setTime'](a0_0x4502ac(_0x15630f,this['zone']));}['toIsoDate'](){const _0x5ede3f={};return _0x5ede3f['fractionalSecondDigits']=0x3,this.#val['toInstant']()['toString'](_0x5ede3f);}['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_0x2b0797(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x2b0797(this['month']())+'-'+a0_0x2b0797(this['day']());}['toTimeInput'](_0x17e5eb=!![]){const _0x1c7683=[];return _0x1c7683['push'](a0_0x2b0797(this['hours']())),_0x1c7683['push'](a0_0x2b0797(this['min']())),_0x17e5eb&&_0x1c7683['push'](a0_0x2b0797(this['sec']())),_0x1c7683['join'](':');}['toDateTimeInput'](_0x31c825=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x31c825);}['toAs'](){return this.#val['toInstant']()['toString']();}['strDate'](){const _0x20a1d0={};return _0x20a1d0['month']='2-digit',_0x20a1d0['day']='2-digit',_0x20a1d0['year']='numeric',this.#val['toLocaleString'](this.#_code,_0x20a1d0);}['strTime'](){return a0_0x2b0797(this['hours']())+':'+a0_0x2b0797(this['min']())+':'+a0_0x2b0797(this['sec']());}['strHHmm'](){return a0_0x2b0797(this['hours']())+':'+a0_0x2b0797(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x26920e){return this.#val['toLocaleString'](this.#_code,_0x26920e);}['strYears'](){return this.#val['year']['toString']();}['strMounth'](){return a0_0x2b0797(this['month'](),0x2);}['strDay'](){return a0_0x2b0797(this['day'](),0x2);}['strHour'](){return a0_0x2b0797(this['hours'](),0x2);}['strMin'](){return a0_0x2b0797(this['min'](),0x2);}['strSec'](){return a0_0x2b0797(this['sec'](),0x2);}['strMsec'](){return a0_0x2b0797(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this.#dyfrmt['ln'](),'sh':()=>this.#dyfrmt['sh'](),'nr':()=>this.#dyfrmt['nr']()};}['addMonth'](_0x4656e8){return this.#val=this.#val['add']({'months':a0_0x52b0c2(_0x4656e8)}),this;}['addDay'](_0x1ccd40){return this['addHours'](_0x1ccd40*0x18),this;}['addHours'](_0x2e9975){return this['addMins'](_0x2e9975*0x3c),this;}['addMins'](_0x1d82da){return this['addSecs'](_0x1d82da*0x3c),this;}['addSecs'](_0x499fd2){return this['addMilliseconds'](_0x499fd2*0x3e8),this;}['addMilliseconds'](_0x5cc17f){return this.#val=this.#val['add']({'milliseconds':a0_0x52b0c2(_0x5cc17f)}),this;}['startOfDay'](){const _0x2ef7ca={};return _0x2ef7ca['hour']=0x0,_0x2ef7ca['minute']=0x0,_0x2ef7ca['second']=0x0,_0x2ef7ca['millisecond']=0x0,this.#val=this.#val['with'](_0x2ef7ca),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){const _0x231195={};return _0x231195['hour']=0x17,_0x231195['minute']=0x3b,_0x231195['second']=0x3b,_0x231195['millisecond']=0x3e7,this.#val=this.#val['with'](_0x231195),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 _0x341420={};return _0x341420['day']=0x1,_0x341420['hour']=0x0,_0x341420['minute']=0x0,_0x341420['second']=0x0,_0x341420['millisecond']=0x0,this.#val=this.#val['with'](_0x341420),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){const _0x47afb2=a0_0x2667aa['Temporal']['ZonedDateTime']['from'](this.#val),_0x3b8bd5={};_0x3b8bd5['day']=_0x47afb2['daysInMonth'];const _0x3b9bab={};return _0x3b9bab['hour']=0x17,_0x3b9bab['minute']=0x3b,_0x3b9bab['second']=0x3b,_0x3b9bab['millisecond']=0x3e7,_0x3b9bab['microsecond']=0x3e7,_0x3b9bab['nanosecond']=0x3e7,this.#val=this.#val['with'](_0x3b8bd5)['with'](_0x3b9bab),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x5d4543){return this['cpy']()['toTime']()===a0_0x4502ac(_0x5d4543,this['zone']);}['gt'](_0xd08e0){return this['cpy']()['toTime']()>a0_0x4502ac(_0xd08e0,this['zone']);}['gte'](_0x200edf){return this['cpy']()['toTime']()>=a0_0x4502ac(_0x200edf,this['zone']);}['lt'](_0xd2561e){return this['cpy']()['toTime']()<a0_0x4502ac(_0xd2561e,this['zone']);}['lte'](_0x5b280b){return this['cpy']()['toTime']()<=a0_0x4502ac(_0x5b280b,this['zone']);}['btw'](_0x55cad7,_0x573441){const _0x3b7230=a0_0x4502ac(_0x55cad7,this['zone']),_0x3f5d18=a0_0x4502ac(_0x573441,this['zone']),_0x131389=this['cpy']()['toTime']();return _0x3b7230<_0x131389&&_0x131389<_0x3f5d18;}['btweq'](_0x5f5400,_0x42d87d){const _0x169ef4=a0_0x4502ac(_0x5f5400,this['zone']),_0x9c7c5c=a0_0x4502ac(_0x42d87d,this['zone']),_0x5e2dee=this['cpy']()['toTime']();return _0x169ef4<=_0x5e2dee&&_0x5e2dee<=_0x9c7c5c;}['btwEqStart'](_0x23fdef,_0x47f006){const _0x4c856f=a0_0x4502ac(_0x23fdef,this['zone']),_0x1a338c=a0_0x4502ac(_0x47f006,this['zone']),_0x2db2b1=this['cpy']()['toTime']();return _0x4c856f<=_0x2db2b1&&_0x2db2b1<_0x1a338c;}['btwEqEnd'](_0x1f2a58,_0xf60e32){const _0xf83440=a0_0x4502ac(_0x1f2a58,this['zone']),_0x5314ba=a0_0x4502ac(_0xf60e32,this['zone']),_0x100677=this['cpy']()['toTime']();return _0xf83440<_0x100677&&_0x100677<=_0x5314ba;}static['diffDays'](_0x4bc75f,_0x6948dc,_0x54d897){const _0xc48c52=a0_0x4502ac(_0x4bc75f,a0_0x4fb016),_0x539b5e=a0_0x4502ac(_0x6948dc,a0_0x4fb016);return _0x54d897?Math['abs'](_0xc48c52-_0x539b5e)/0x36ee80/0x18:(_0xc48c52-_0x539b5e)/0x36ee80/0x18;}static['diffHours'](_0x5b3b81,_0x25d05b,_0x385487){const _0x50df63=a0_0x4502ac(_0x5b3b81,a0_0x4fb016),_0x265609=a0_0x4502ac(_0x25d05b,a0_0x4fb016);return _0x385487?Math['abs'](_0x50df63-_0x265609)/0x36ee80:(_0x50df63-_0x265609)/0x36ee80;}static['diffMins'](_0x91fcc5,_0x3dca9b,_0x4046e7){const _0x277f90=a0_0x4502ac(_0x91fcc5,a0_0x4fb016),_0x2d9303=a0_0x4502ac(_0x3dca9b,a0_0x4fb016);return _0x4046e7?Math['abs'](_0x277f90-_0x2d9303)/0x3e8/0x3c:(_0x277f90-_0x2d9303)/0x3e8/0x3c;}static['diffSecs'](_0x366ebe,_0x4a184d,_0xded2f){const _0x3cc151=a0_0x4502ac(_0x366ebe,a0_0x4fb016),_0x825abe=a0_0x4502ac(_0x4a184d,a0_0x4fb016);return _0xded2f?Math['abs'](_0x3cc151-_0x825abe)/0x3e8:(_0x3cc151-_0x825abe)/0x3e8;}static['divideTime'](_0x3ee0f0){return a0_0x530287(_0x3ee0f0);}}exports['MDateUtil']=a0_0x3b4d22;const a0_0x12250c={};a0_0x12250c['value']='MDateUtil',a0_0x12250c['writable']=![],a0_0x12250c['enumerable']=!![],a0_0x12250c['configurable']=![],Object['defineProperty'](a0_0x3b4d22['prototype'],'idkey',a0_0x12250c);
|
|
1
|
+
'use strict';const a0_0x205c4c={};a0_0x205c4c['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x205c4c),exports['MDateUtil']=void 0x0;const a0_0x5af742=require('temporal-polyfill'),a0_0x4995d4=(_0x224828,_0x15e6d3=0x2)=>_0x224828['toString']()['padStart'](_0x15e6d3,'0');function a0_0x1d9b9c(_0x35e74a,_0x401f20){try{return _0x35e74a();}catch(_0x17b5f7){if(_0x401f20)return _0x401f20;throw new Error('UNKNOWN');}}function a0_0x2e482e(_0x47d621,_0x300839){try{if(_0x47d621 instanceof a0_0x6055e5||_0x47d621['idkey']==='MDateUtil')return _0x47d621['toTime']();if(typeof _0x47d621==='string'){const _0x51bbd3=Date['parse'](_0x47d621);return a0_0x5af742['Temporal']['Instant']['fromEpochMilliseconds'](_0x51bbd3)['toZonedDateTimeISO'](_0x300839)['epochMilliseconds'];}if(typeof _0x47d621==='number')return _0x47d621;if(_0x47d621 instanceof Date)return a0_0x5af742['Temporal']['Instant']['fromEpochMilliseconds'](_0x47d621['getTime']())['toZonedDateTimeISO'](_0x300839)['epochMilliseconds'];return 0x0;}catch(_0x58829a){throw new Error('ERROR');}}function a0_0x25a72a(_0x2c5668){function _0x4e8b2e(_0x2b2216){const _0x6f2830={};return _0x6f2830['weekday']=_0x2b2216,a0_0x1d9b9c(()=>new Intl['DateTimeFormat'](_0x2c5668['localCode'],_0x6f2830)['format'](a0_0x2e482e(_0x2c5668,_0x2c5668['zone'])),'');}function _0x16f9c3(){return _0x4e8b2e('long');}function _0x150362(){return _0x4e8b2e('short');}function _0x5378a5(){return _0x4e8b2e('narrow');}const _0x312568={};return _0x312568['ln']=_0x16f9c3,_0x312568['sh']=_0x150362,_0x312568['nr']=_0x5378a5,_0x312568;}function a0_0x4078f7(_0x51dcc0=''){const _0x261620={};_0x261620['h']=undefined,_0x261620['m']=undefined,_0x261620['s']=undefined,_0x261620['ms']=undefined;const _0xd79f4a=_0x261620,_0x372404=_0x51dcc0['match'](/\b\d{1,2}:\d{2}(?::\d{2})?\b/);if(_0x372404?.[0x0]){const [_0x131251,_0x163110,_0xf7e22e]=_0x372404[0x0]['split'](':')['map'](Number);_0xd79f4a['h']=_0x131251,_0xd79f4a['m']=_0x163110,_0xd79f4a['s']=_0xf7e22e;}const _0x3b902f=_0x51dcc0['match'](/\.(\d{1,3})/);return _0x3b902f?.[0x1]&&(_0xd79f4a['ms']=Number(_0x3b902f[0x1]['padEnd'](0x3,'0'))),_0xd79f4a;}let a0_0x32c2c3=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x5d57fd=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];function a0_0x512cf7(_0x1052f3){return Math['floor'](_0x1052f3)||0x0;}class a0_0x6055e5{#val;#_code=a0_0x32c2c3;#_zone=a0_0x5d57fd;#_dyfrmt;get['localCode'](){return this.#_code;}get['zone'](){return this.#_zone;}['with'](_0x3186b2){this.#val=this.#val['with']({'year':_0x3186b2['getFullYear'](),'month':_0x3186b2['getMonth']()+0x1,'day':_0x3186b2['getDate'](),'hour':_0x3186b2['getHours'](),'minute':_0x3186b2['getMinutes'](),'second':_0x3186b2['getSeconds'](),'millisecond':_0x3186b2['getMilliseconds']()});}['init'](){return this.#val=a0_0x5af742['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this;}['toString'](){return'---';}static['new'](){return new a0_0x6055e5()['setCode'](a0_0x32c2c3)['setZone'](a0_0x5d57fd)['init']();}static['setCode'](_0x18cb26){return a0_0x32c2c3=_0x18cb26,this;}static['setZone'](_0x5f31e0){return a0_0x5d57fd=_0x5f31e0,this;}static['seperator'](){return a0_0x1d9b9c(()=>new Date()['toLocaleDateString'](a0_0x32c2c3)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x6055e5['new']()['setTime'](this['toTime']());}['setCode'](_0x46e25c){return this.#_code=_0x46e25c,this;}['setZone'](_0x31ddab){return this.#_zone=_0x31ddab,this;}['seperator'](){return a0_0x1d9b9c(()=>new Date()['toLocaleDateString'](this.#_code)['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x1d9b9c(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x4fc338=this.#_code){return a0_0x1d9b9c(()=>{return new Intl['Locale'](_0x4fc338)?.['timeZones']||[];},null);}['region'](_0x50516e=this.#_code){return a0_0x1d9b9c(()=>{return new Intl['Locale'](_0x50516e)['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 _0x144654=this.#val['dayOfWeek'];return _0x144654?_0x144654:0x7;}['dayOfWeekUtc'](){return this.#val['dayOfWeek']-0x1;}['setYear'](_0x5ac527){return this.#val=this.#val['with']({'year':a0_0x512cf7(_0x5ac527)}),this;}['setMonth'](_0x499b0c){return this.#val=this.#val['with']({'month':a0_0x512cf7(_0x499b0c)}),this;}['setMonthUtc'](_0x11e738){return this.#val=this.#val['with']({'month':a0_0x512cf7(_0x11e738)+0x1}),this;}['setDay'](_0x2f143b){return this.#val=this.#val['with']({'day':a0_0x512cf7(_0x2f143b)}),this;}['setHour'](_0x1a1626){return this.#val=this.#val['with']({'hour':a0_0x512cf7(_0x1a1626)}),this;}['startOfHours'](){const _0xf6b523={};return _0xf6b523['minute']=0x0,_0xf6b523['second']=0x0,_0xf6b523['millisecond']=0x0,this.#val=this.#val['with'](_0xf6b523),this;}['endOfHours'](){const _0x1a3e83={};return _0x1a3e83['minute']=0x3b,_0x1a3e83['second']=0x3b,_0x1a3e83['millisecond']=0x3e7,this.#val=this.#val['with'](_0x1a3e83),this;}['setMin'](_0x518d47){return this.#val=this.#val['with']({'minute':a0_0x512cf7(_0x518d47)}),this;}['startOfMin'](){const _0x344ddc={};return _0x344ddc['second']=0x0,_0x344ddc['millisecond']=0x0,this.#val=this.#val['with'](_0x344ddc),this;}['endOfMin'](){const _0x476e4d={};return _0x476e4d['second']=0x3b,_0x476e4d['millisecond']=0x3e7,this.#val=this.#val['with'](_0x476e4d),this;}['setSeconds'](_0x22af58){return this.#val=this.#val['with']({'second':a0_0x512cf7(_0x22af58)}),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x384ad3){return this.#val=this.#val['with']({'millisecond':a0_0x512cf7(_0x384ad3)}),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x5c233a){return _0x5c233a?this.#val=a0_0x5af742['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x5c233a)['getTime']())['toZonedDateTimeISO'](this['zone']):this.#val=a0_0x5af742['Temporal']['Now']['zonedDateTimeISO'](this['zone']),this;}['setTime'](_0x330312){return this.#val=a0_0x5af742['Temporal']['Instant']['fromEpochMilliseconds'](_0x330312||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x4172f7){return this['setIsoDate'](_0x4172f7?.['toISOString']()),this;}['setDateInputValue'](_0x219f95){const _0x5ac466=_0x219f95?new Date(_0x219f95?.['replace']('T','\x20')):new Date();return _0x5ac466['getTime']()&&(this.#val=a0_0x5af742['Temporal']['Instant']['fromEpochMilliseconds'](_0x5ac466?.['getTime']())['toZonedDateTimeISO'](this['zone']),this['with'](_0x5ac466)),this;}['setVal'](_0x4f17ba){return a0_0x6055e5['new']()['setTime'](a0_0x2e482e(_0x4f17ba,this['zone']));}['toIsoDate'](){const _0x17caf8={};return _0x17caf8['fractionalSecondDigits']=0x3,this.#val['toInstant']()['toString'](_0x17caf8);}['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_0x4995d4(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x4995d4(this['month']())+'-'+a0_0x4995d4(this['day']());}['toTimeInput'](_0x4a422e=!![]){const _0x118d66=[];return _0x118d66['push'](a0_0x4995d4(this['hours']())),_0x118d66['push'](a0_0x4995d4(this['min']())),_0x4a422e&&_0x118d66['push'](a0_0x4995d4(this['sec']())),_0x118d66['join'](':');}['toDateTimeInput'](_0x33153c=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x33153c);}['toAs'](){return this.#val['toInstant']()['toString']();}['strDate'](){const _0x2b4e52={};return _0x2b4e52['month']='2-digit',_0x2b4e52['day']='2-digit',_0x2b4e52['year']='numeric',this.#val['toLocaleString'](this.#_code,_0x2b4e52);}['strTime'](){return a0_0x4995d4(this['hours']())+':'+a0_0x4995d4(this['min']())+':'+a0_0x4995d4(this['sec']());}['strHHmm'](){return a0_0x4995d4(this['hours']())+':'+a0_0x4995d4(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x4b4e47){return this.#val['toLocaleString'](this.#_code,_0x4b4e47);}['strYears'](){return this.#val['year']['toString']();}['strMounth'](){return a0_0x4995d4(this['month'](),0x2);}['strDay'](){return a0_0x4995d4(this['day'](),0x2);}['strHour'](){return a0_0x4995d4(this['hours'](),0x2);}['strMin'](){return a0_0x4995d4(this['min'](),0x2);}['strSec'](){return a0_0x4995d4(this['sec'](),0x2);}['strMsec'](){return a0_0x4995d4(this['msec'](),0x2);}['strDayStr'](){return this.#_dyfrmt=a0_0x25a72a(this),{'ln':()=>this.#_dyfrmt['ln'](),'sh':()=>this.#_dyfrmt['sh'](),'nr':()=>this.#_dyfrmt['nr']()};}['addMonth'](_0x4bc7ec){return this.#val=this.#val['add']({'months':a0_0x512cf7(_0x4bc7ec)}),this;}['addDay'](_0x16e870){return this['addHours'](_0x16e870*0x18),this;}['addHours'](_0x29900a){return this['addMins'](_0x29900a*0x3c),this;}['addMins'](_0x2ba8da){return this['addSecs'](_0x2ba8da*0x3c),this;}['addSecs'](_0x57082e){return this['addMilliseconds'](_0x57082e*0x3e8),this;}['addMilliseconds'](_0x32e6a5){return this.#val=this.#val['add']({'milliseconds':a0_0x512cf7(_0x32e6a5)}),this;}['startOfDay'](){const _0x2e619d={};return _0x2e619d['hour']=0x0,_0x2e619d['minute']=0x0,_0x2e619d['second']=0x0,_0x2e619d['millisecond']=0x0,this.#val=this.#val['with'](_0x2e619d),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){const _0x249e04={};return _0x249e04['hour']=0x17,_0x249e04['minute']=0x3b,_0x249e04['second']=0x3b,_0x249e04['millisecond']=0x3e7,this.#val=this.#val['with'](_0x249e04),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 _0x5d13d2={};return _0x5d13d2['day']=0x1,_0x5d13d2['hour']=0x0,_0x5d13d2['minute']=0x0,_0x5d13d2['second']=0x0,_0x5d13d2['millisecond']=0x0,this.#val=this.#val['with'](_0x5d13d2),this;}['cpyByStartOfMonth'](){return this['cpy']()['startOfMonth']();}['endOfMonth'](){const _0x40835b=a0_0x5af742['Temporal']['ZonedDateTime']['from'](this.#val),_0x1b35b6={};_0x1b35b6['day']=_0x40835b['daysInMonth'];const _0x362f60={};return _0x362f60['hour']=0x17,_0x362f60['minute']=0x3b,_0x362f60['second']=0x3b,_0x362f60['millisecond']=0x3e7,_0x362f60['microsecond']=0x3e7,_0x362f60['nanosecond']=0x3e7,this.#val=this.#val['with'](_0x1b35b6)['with'](_0x362f60),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x27e615){return this['cpy']()['toTime']()===a0_0x2e482e(_0x27e615,this['zone']);}['gt'](_0x1360cf){return this['cpy']()['toTime']()>a0_0x2e482e(_0x1360cf,this['zone']);}['gte'](_0x397eae){return this['cpy']()['toTime']()>=a0_0x2e482e(_0x397eae,this['zone']);}['lt'](_0x5bc7d6){return this['cpy']()['toTime']()<a0_0x2e482e(_0x5bc7d6,this['zone']);}['lte'](_0x1c7811){return this['cpy']()['toTime']()<=a0_0x2e482e(_0x1c7811,this['zone']);}['btw'](_0x325bed,_0x378992){const _0x114072=a0_0x2e482e(_0x325bed,this['zone']),_0x29ec48=a0_0x2e482e(_0x378992,this['zone']),_0x3e054c=this['cpy']()['toTime']();return _0x114072<_0x3e054c&&_0x3e054c<_0x29ec48;}['btweq'](_0x5a76b5,_0x22cc9c){const _0x149e12=a0_0x2e482e(_0x5a76b5,this['zone']),_0xd209ce=a0_0x2e482e(_0x22cc9c,this['zone']),_0x1ed2f4=this['cpy']()['toTime']();return _0x149e12<=_0x1ed2f4&&_0x1ed2f4<=_0xd209ce;}['btwEqStart'](_0x15e034,_0x4f2089){const _0x5c6a6f=a0_0x2e482e(_0x15e034,this['zone']),_0x94b5f7=a0_0x2e482e(_0x4f2089,this['zone']),_0x5cf683=this['cpy']()['toTime']();return _0x5c6a6f<=_0x5cf683&&_0x5cf683<_0x94b5f7;}['btwEqEnd'](_0x4c4478,_0x2aab95){const _0x5c09cb=a0_0x2e482e(_0x4c4478,this['zone']),_0x5b5eb8=a0_0x2e482e(_0x2aab95,this['zone']),_0x41c88e=this['cpy']()['toTime']();return _0x5c09cb<_0x41c88e&&_0x41c88e<=_0x5b5eb8;}['diffDays'](_0x4d5a44,_0x43ae3e){const _0x350e47=this['toTime'](),_0x588432=a0_0x2e482e(_0x4d5a44,a0_0x5d57fd);return _0x43ae3e?Math['abs'](_0x350e47-_0x588432)/0x36ee80/0x18:(_0x350e47-_0x588432)/0x36ee80/0x18;}['diffHours'](_0x184e18,_0x32bc73){const _0x19cb71=this['toTime'](),_0x2bfd30=a0_0x2e482e(_0x184e18,a0_0x5d57fd);return _0x32bc73?Math['abs'](_0x19cb71-_0x2bfd30)/0x36ee80:(_0x19cb71-_0x2bfd30)/0x36ee80;}['diffMins'](_0x12ca33,_0x34ed8a){const _0x5d4b79=this['toTime'](),_0x74c4f5=a0_0x2e482e(_0x12ca33,a0_0x5d57fd);return _0x34ed8a?Math['abs'](_0x5d4b79-_0x74c4f5)/0x3e8/0x3c:(_0x5d4b79-_0x74c4f5)/0x3e8/0x3c;}['diffSecs'](_0x268d1c,_0x1a1502){const _0x3b37b6=this['toTime'](),_0xb5e250=a0_0x2e482e(_0x268d1c,a0_0x5d57fd);return _0x1a1502?Math['abs'](_0x3b37b6-_0xb5e250)/0x3e8:(_0x3b37b6-_0xb5e250)/0x3e8;}static['diffDays'](_0x577d4c,_0x313e8b,_0xd2a94a){const _0xd0460f=a0_0x2e482e(_0x577d4c,a0_0x5d57fd),_0x51e80c=a0_0x2e482e(_0x313e8b,a0_0x5d57fd);return _0xd2a94a?Math['abs'](_0xd0460f-_0x51e80c)/0x36ee80/0x18:(_0xd0460f-_0x51e80c)/0x36ee80/0x18;}static['diffHours'](_0x32c62e,_0x1a6018,_0x53bf29){const _0x5dfad5=a0_0x2e482e(_0x32c62e,a0_0x5d57fd),_0x5699ab=a0_0x2e482e(_0x1a6018,a0_0x5d57fd);return _0x53bf29?Math['abs'](_0x5dfad5-_0x5699ab)/0x36ee80:(_0x5dfad5-_0x5699ab)/0x36ee80;}static['diffMins'](_0x25b9c3,_0x4bb817,_0x37fe8a){const _0x29fe42=a0_0x2e482e(_0x25b9c3,a0_0x5d57fd),_0x2845c5=a0_0x2e482e(_0x4bb817,a0_0x5d57fd);return _0x37fe8a?Math['abs'](_0x29fe42-_0x2845c5)/0x3e8/0x3c:(_0x29fe42-_0x2845c5)/0x3e8/0x3c;}static['diffSecs'](_0x3ef0ac,_0x43c57f,_0x15435c){const _0xf298f1=a0_0x2e482e(_0x3ef0ac,a0_0x5d57fd),_0x297fa1=a0_0x2e482e(_0x43c57f,a0_0x5d57fd);return _0x15435c?Math['abs'](_0xf298f1-_0x297fa1)/0x3e8:(_0xf298f1-_0x297fa1)/0x3e8;}static['divideTime'](_0x5b4fa4){return a0_0x4078f7(_0x5b4fa4);}}exports['MDateUtil']=a0_0x6055e5;const a0_0x266d2f={};a0_0x266d2f['value']='MDateUtil',a0_0x266d2f['writable']=![],a0_0x266d2f['enumerable']=!![],a0_0x266d2f['configurable']=![],Object['defineProperty'](a0_0x6055e5['prototype'],'idkey',a0_0x266d2f);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x6602fd=this&&this['__createBinding']||(Object['create']?function(_0x51c54f,_0x37cfea,_0x1e58b7,_0x427a33){if(_0x427a33===undefined)_0x427a33=_0x1e58b7;var _0x82be2c=Object['getOwnPropertyDescriptor'](_0x37cfea,_0x1e58b7);if(!_0x82be2c||('get'in _0x82be2c?!_0x37cfea['__esModule']:_0x82be2c['writable']||_0x82be2c['configurable'])){var _0x5024ac={};_0x5024ac['enumerable']=!![],_0x5024ac['get']=function(){return _0x37cfea[_0x1e58b7];},_0x82be2c=_0x5024ac;}Object['defineProperty'](_0x51c54f,_0x427a33,_0x82be2c);}:function(_0x32d7dd,_0x2178b4,_0x803241,_0x31d70e){if(_0x31d70e===undefined)_0x31d70e=_0x803241;_0x32d7dd[_0x31d70e]=_0x2178b4[_0x803241];}),a0_0x181a51=this&&this['__exportStar']||function(_0x1bb4ad,_0x588811){for(var _0x845a87 in _0x1bb4ad)if(_0x845a87!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x588811,_0x845a87))a0_0x6602fd(_0x588811,_0x1bb4ad,_0x845a87);},a0_0x24fe86={};a0_0x24fe86['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x24fe86),a0_0x181a51(require('./DateUtil'),exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mat-date",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.75",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tslib": "^2.5.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@types/node": "^
|
|
33
|
+
"@types/node": "^22.19.0",
|
|
34
34
|
"typescript": "^5.0.2"
|
|
35
35
|
}
|
|
36
36
|
}
|