mat-date 1.7.45 → 1.7.51
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 +8 -0
- package/dist/DateUtil.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/DateUtil.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class MDateUtil {
|
|
|
17
17
|
private val;
|
|
18
18
|
private static glCode;
|
|
19
19
|
private code;
|
|
20
|
+
private dyfrmt;
|
|
20
21
|
get localCode(): string;
|
|
21
22
|
static new(): MDateUtil;
|
|
22
23
|
static setCode(code: string): typeof MDateUtil;
|
|
@@ -34,6 +35,7 @@ export declare class MDateUtil {
|
|
|
34
35
|
hours(): number;
|
|
35
36
|
min(): number;
|
|
36
37
|
sec(): number;
|
|
38
|
+
msec(): number;
|
|
37
39
|
dayOfWeek(): number;
|
|
38
40
|
dayOfWeekUtc(): number;
|
|
39
41
|
setYear(value: number): this;
|
|
@@ -77,6 +79,12 @@ export declare class MDateUtil {
|
|
|
77
79
|
strHour(): string;
|
|
78
80
|
strMin(): string;
|
|
79
81
|
strSec(): string;
|
|
82
|
+
strMsec(): string;
|
|
83
|
+
strDayStr(): {
|
|
84
|
+
ln: () => string;
|
|
85
|
+
sh: () => string;
|
|
86
|
+
nr: () => string;
|
|
87
|
+
};
|
|
80
88
|
addDay(value: number): this;
|
|
81
89
|
addHours(value: number): this;
|
|
82
90
|
addMins(value: number): this;
|
package/dist/DateUtil.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x140b4={};a0_0x140b4['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x140b4),exports['MDateUtil']=void 0x0;const a0_0x1933e3=(_0x1254f8,_0x295f52=0x2)=>_0x1254f8['toString']()['padStart'](_0x295f52,'0');function a0_0xa61d2(_0x4de9f1,_0x5311a){try{return _0x4de9f1();}catch(_0x2b3309){if(_0x5311a)return _0x5311a;throw new Error('UNKNOWN');}}function a0_0x5cdec6(_0x3f7a0a){try{if(_0x3f7a0a instanceof Date)return _0x3f7a0a['getTime']();if(typeof _0x3f7a0a==='number')return _0x3f7a0a;if(typeof _0x3f7a0a==='string')return new Date(_0x3f7a0a)['getTime']();if(_0x3f7a0a instanceof a0_0x24ec01)return _0x3f7a0a['toTime']();if(_0x3f7a0a['idkey']==='mdateutil')return _0x3f7a0a['toTime']();return 0x0;}catch(_0x1fbe0c){throw new Error('ERROR');}}function a0_0x1a5df3(_0x2ad72d,_0x1d94bd,_0x4e917d,_0x20196a){const _0x17165=a0_0x5cdec6(_0x2ad72d),_0x3c97ed=a0_0x5cdec6(_0x1d94bd),_0x174407=a0_0x5cdec6(_0x4e917d),_0x93512d=a0_0x5cdec6(_0x20196a);return _0x174407<=_0x17165&&_0x93512d>=_0x17165&&_0x93512d<=_0x3c97ed||_0x174407>=_0x17165&&_0x174407<=_0x3c97ed&&_0x93512d>=_0x3c97ed||_0x174407>=_0x17165&&_0x174407<=_0x3c97ed&&_0x93512d<=_0x3c97ed||_0x174407<=_0x17165&&_0x93512d>=_0x3c97ed;}function a0_0x22b8e2(_0x277e59){let _0x452d15=null,_0x4ac787=null,_0x18579e=null,_0x4a7bc7=null;try{const _0x3f3efe=(_0x277e59||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x452d15=_0x3f3efe['length']>=0x1?Number(_0x3f3efe[0x0]):null,_0x4ac787=_0x3f3efe['length']>=0x2?Number(_0x3f3efe[0x1]):null,_0x18579e=_0x3f3efe['length']>=0x3?Number(_0x3f3efe[0x2]):null;}catch(_0x511206){}try{let _0x4a23d3=_0x277e59||'',_0x58a825=/\.\d{3}/g,_0xa26d0f=_0x4a23d3['match'](_0x58a825)[0x0]['split']('.')['filter'](_0x30f625=>Boolean(_0x30f625));_0x4a7bc7=_0xa26d0f['length']>=0x1?Number(_0xa26d0f[0x0]):null;}catch(_0x290ecd){}const _0x580ae4={};return _0x580ae4['h']=_0x452d15,_0x580ae4['m']=_0x4ac787,_0x580ae4['s']=_0x18579e,_0x580ae4['ms']=_0x4a7bc7,_0x580ae4;}class a0_0x24ec01{['val']=new Date();static ['glCode']=undefined;['code']=undefined;get['localCode'](){return this['code'];}static['new'](){return new a0_0x24ec01()['setCode'](a0_0x24ec01['glCode']);}static['setCode'](_0x1504f7){return a0_0x24ec01['glCode']=_0x1504f7,this;}static['seperator'](){return a0_0xa61d2(()=>new Date()['toLocaleDateString'](a0_0x24ec01['glCode'])['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0xa61d2(()=>a0_0x24ec01['new']()['setTime'](this['toTime']()));}['setCode'](_0x202955){return this['code']=_0x202955,this;}['seperator'](){return a0_0xa61d2(()=>new Date()['toLocaleDateString'](this['code'])['replace'](/\d/g,'')['split']('')[0x0]);}['zone'](){return a0_0xa61d2(()=>{return Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x311ba2=this['code']){return a0_0xa61d2(()=>{return new Intl['Locale'](_0x311ba2)?.['timeZones']||[];},null);}['region'](_0x2c73a5=this['code']){return a0_0xa61d2(()=>{return new Intl['Locale'](_0x2c73a5)['region'];},null);}['year'](){return this['val']['getFullYear']();}['month'](){return this['val']['getMonth']()+0x1;}['monthUtc'](){return this['val']['getMonth']();}['day'](){return this['val']['getDate']();}['hours'](){return this['val']['getHours']();}['min'](){return this['val']['getMinutes']();}['sec'](){return this['val']['getSeconds']();}['dayOfWeek'](){const _0xffe606=this['val']['getDay']();return _0xffe606?_0xffe606:0x7;}['dayOfWeekUtc'](){return this['val']['getDay']();}['setYear'](_0x59ee05){return this['val']['setFullYear'](_0x59ee05),this;}['setMonth'](_0x1a2e26){return this['val']['setMonth'](_0x1a2e26-0x1),this;}['setMonthUtc'](_0x3d68f9){return this['val']['setMonth'](_0x3d68f9),this;}['setDay'](_0x6b3197){return this['val']['setDate'](_0x6b3197),this;}['setHour'](_0x402348){return this['val']['setHours'](_0x402348),this;}['startOfHours'](){return this['setHour'](0x0),this['setMin'](0x0),this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfHours'](){return this['setHour'](0x17),this['setMin'](0x3b),this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setMin'](_0x27e791){return this['val']['setMinutes'](_0x27e791),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x5734d3){return this['val']['setSeconds'](_0x5734d3),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x3d3436){return this['val']['setMilliseconds'](_0x3d3436),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x164c6c){return this['val']=new Date(_0x164c6c),this;}['setTime'](_0x1394a6){return this['val']=new Date(_0x1394a6),this;}['setDate'](_0x6c7264){return this['val']=new Date(_0x6c7264),this;}['setDateInputValue'](_0x338a9){return this['val']=new Date(_0x338a9?.['replace']('T','\x20')),this;}['setVal'](_0x42cce2){return a0_0xa61d2(()=>{return a0_0x24ec01['new']()['setTime'](a0_0x5cdec6(_0x42cce2));});}['toIsoDate'](){return this['val']['toISOString']();}['toTime'](){return this['val']['getTime']();}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x1933e3(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x1933e3(this['month']())+'-'+a0_0x1933e3(this['day']());}['toTimeInput'](_0x3ac285=!![]){const _0x350054=[];return _0x350054['push'](a0_0x1933e3(this['hours']())),_0x350054['push'](a0_0x1933e3(this['min']())),_0x3ac285&&_0x350054['push'](a0_0x1933e3(this['sec']())),_0x350054['join'](':');}['toDateTimeInput'](_0xde1c93=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0xde1c93);}['strDate'](){const _0x21404b={};return _0x21404b['month']='2-digit',_0x21404b['day']='2-digit',_0x21404b['year']='numeric',this['val']['toLocaleDateString'](this['code'],_0x21404b);}['strDateLocal'](_0x45efee){return this['val']['toLocaleDateString'](this['code'],_0x45efee);}['strTime'](){return a0_0x1933e3(this['hours']())+':'+a0_0x1933e3(this['min']())+':'+a0_0x1933e3(this['sec']());}['strTimeLocale'](_0x2a7d52){return this['val']['toLocaleTimeString'](this['code'],_0x2a7d52);}['strHHmm'](){return a0_0x1933e3(this['hours']())+':'+a0_0x1933e3(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0xa49716){return this['val']['toLocaleString'](this['code'],_0xa49716);}['strYears'](){return this['val']['getFullYear']()['toString']();}['strMounth'](){return a0_0x1933e3(this['month'](),0x2);}['strDay'](){return a0_0x1933e3(this['day'](),0x2);}['strHour'](){return a0_0x1933e3(this['hours'](),0x2);}['strMin'](){return a0_0x1933e3(this['min'](),0x2);}['strSec'](){return a0_0x1933e3(this['sec'](),0x2);}['addDay'](_0x396adc){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x396adc*0x18)),this;}['addHours'](_0x2124bd){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x2124bd)),this;}['addMins'](_0x3bf780){return this['val']=new Date(this['val']['setMinutes'](this['val']['getMinutes']()+_0x3bf780)),this;}['startOfDay'](){return this['startOfHours'](),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){return 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['setDate'](this['val'])['startOfMonth']()['setMonth'](this['month']()+0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x2f7c4e){return a0_0xa61d2(()=>{return this['cpy']()['toTime']()===a0_0x5cdec6(_0x2f7c4e);});}['gt'](_0x478a96){return a0_0xa61d2(()=>{return this['cpy']()['toTime']()>a0_0x5cdec6(_0x478a96);});}['gte'](_0x3581b3){return a0_0xa61d2(()=>{return this['cpy']()['toTime']()>=a0_0x5cdec6(_0x3581b3);});}['lt'](_0xc20e2){return a0_0xa61d2(()=>{return this['cpy']()['toTime']()<a0_0x5cdec6(_0xc20e2);});}['lte'](_0x43892f){return a0_0xa61d2(()=>{return this['cpy']()['toTime']()<=a0_0x5cdec6(_0x43892f);});}['btw'](_0x94b17a,_0x34f88e){return a0_0xa61d2(()=>{const _0x108054=a0_0x5cdec6(_0x94b17a),_0xdb8797=a0_0x5cdec6(_0x34f88e),_0x394e8f=this['cpy']()['toTime']();return _0x108054<_0x394e8f&&_0x394e8f<_0xdb8797;});}['btweq'](_0x14c6c8,_0x575b74){return a0_0xa61d2(()=>{const _0xf40fc8=a0_0x5cdec6(_0x14c6c8),_0x204267=a0_0x5cdec6(_0x575b74),_0xecc07f=this['cpy']()['toTime']();return _0xf40fc8<=_0xecc07f&&_0xecc07f<=_0x204267;});}['btwEqStart'](_0x8a0900,_0x29c9b7){return a0_0xa61d2(()=>{const _0x4989c3=a0_0x5cdec6(_0x8a0900),_0x446919=a0_0x5cdec6(_0x29c9b7),_0x4a47e0=this['cpy']()['toTime']();return _0x4989c3<=_0x4a47e0&&_0x4a47e0<_0x446919;});}['btwEqEnd'](_0x5bcd25,_0x397b33){return a0_0xa61d2(()=>{const _0x2f5a99=a0_0x5cdec6(_0x5bcd25),_0x1270ab=a0_0x5cdec6(_0x397b33),_0x95c48f=this['cpy']()['toTime']();return _0x2f5a99<_0x95c48f&&_0x95c48f<=_0x1270ab;});}static['diffDays'](_0x2e1d21,_0x810fdd,_0x22a225){return a0_0xa61d2(()=>{const _0x394447=a0_0x5cdec6(_0x2e1d21),_0x2e5bb1=a0_0x5cdec6(_0x810fdd);return _0x22a225?Math['abs'](_0x394447-_0x2e5bb1)/0x36ee80/0x18:(_0x394447-_0x2e5bb1)/0x36ee80/0x18;});}static['diffHours'](_0x4154c9,_0x26980c,_0xae28f0){return a0_0xa61d2(()=>{const _0x67e1c=a0_0x5cdec6(_0x4154c9),_0x4de9ad=a0_0x5cdec6(_0x26980c);return _0xae28f0?Math['abs'](_0x67e1c-_0x4de9ad)/0x36ee80:(_0x67e1c-_0x4de9ad)/0x36ee80;});}static['diffMins'](_0x33d81c,_0x216103,_0x5c3504){return a0_0xa61d2(()=>{const _0xc70223=a0_0x5cdec6(_0x33d81c),_0x4e4a81=a0_0x5cdec6(_0x216103);return _0x5c3504?Math['abs'](_0xc70223-_0x4e4a81)/0x3e8/0x3c:(_0xc70223-_0x4e4a81)/0x3e8/0x3c;});}static['diffSecs'](_0x24a27f,_0x41f9ed,_0x3cc440){return a0_0xa61d2(()=>{const _0x25d1af=a0_0x5cdec6(_0x24a27f),_0x5004d6=a0_0x5cdec6(_0x41f9ed);return _0x3cc440?Math['abs'](_0x25d1af-_0x5004d6)/0x3e8:(_0x25d1af-_0x5004d6)/0x3e8;});}static['s1'](_0x5a3f9f,_0x157705,_0x5ebfa7,_0x3a8234){return a0_0xa61d2(()=>a0_0x1a5df3(_0x5a3f9f,_0x157705,_0x5ebfa7,_0x3a8234));}static['divideTime'](_0xc0a76){return a0_0xa61d2(()=>a0_0x22b8e2(_0xc0a76));}}exports['MDateUtil']=a0_0x24ec01;const a0_0x22209f={};a0_0x22209f['value']='mdateutil',a0_0x22209f['writable']=![],a0_0x22209f['enumerable']=!![],a0_0x22209f['configurable']=![],Object['defineProperty'](a0_0x24ec01['prototype'],'idkey',a0_0x22209f);
|
|
1
|
+
'use strict';const a0_0x504372={};a0_0x504372['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x504372),exports['MDateUtil']=void 0x0;const a0_0x3d9cf4=(_0x54beb6,_0x141fcb=0x2)=>_0x54beb6['toString']()['padStart'](_0x141fcb,'0');function a0_0x539804(_0x122787,_0x3fc13f){try{return _0x122787();}catch(_0x3f6946){if(_0x3fc13f)return _0x3fc13f;throw new Error('UNKNOWN');}}function a0_0x57f643(_0x188abe){try{if(_0x188abe instanceof Date)return _0x188abe['getTime']();if(typeof _0x188abe==='number')return _0x188abe;if(typeof _0x188abe==='string')return new Date(_0x188abe)['getTime']();if(_0x188abe instanceof a0_0x72f0b0)return _0x188abe['toTime']();if(_0x188abe['idkey']==='mdateutil')return _0x188abe['toTime']();return 0x0;}catch(_0x5a3e8e){throw new Error('ERROR');}}function a0_0xcab0da(_0x2ba392){function _0x1bd97e(_0x5ec600){const _0x236d06={};return _0x236d06['weekday']=_0x5ec600,a0_0x539804(()=>new Intl['DateTimeFormat'](_0x2ba392['localCode'],_0x236d06)['format'](a0_0x57f643(_0x2ba392)),'');}function _0xb10119(){return _0x1bd97e('long');}function _0x2426cd(){return _0x1bd97e('short');}function _0x56281d(){return _0x1bd97e('narrow');}const _0x35de19={};return _0x35de19['ln']=_0xb10119,_0x35de19['sh']=_0x2426cd,_0x35de19['nr']=_0x56281d,_0x35de19;}function a0_0x116ac5(_0x36e309,_0xacbedc,_0x31a9c0,_0x31bd6f){const _0x4cf378=a0_0x57f643(_0x36e309),_0x3096d0=a0_0x57f643(_0xacbedc),_0x3ed5d6=a0_0x57f643(_0x31a9c0),_0x535450=a0_0x57f643(_0x31bd6f);return _0x3ed5d6<=_0x4cf378&&_0x535450>=_0x4cf378&&_0x535450<=_0x3096d0||_0x3ed5d6>=_0x4cf378&&_0x3ed5d6<=_0x3096d0&&_0x535450>=_0x3096d0||_0x3ed5d6>=_0x4cf378&&_0x3ed5d6<=_0x3096d0&&_0x535450<=_0x3096d0||_0x3ed5d6<=_0x4cf378&&_0x535450>=_0x3096d0;}function a0_0x5ede8b(_0x32f4ee){let _0x4a17bc=undefined,_0x56e360=undefined,_0x3330da=undefined,_0xfb7345=undefined;try{const _0x22f622=(_0x32f4ee||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x4a17bc=_0x22f622['length']>=0x1?Number(_0x22f622[0x0]):undefined,_0x56e360=_0x22f622['length']>=0x2?Number(_0x22f622[0x1]):undefined,_0x3330da=_0x22f622['length']>=0x3?Number(_0x22f622[0x2]):undefined;}catch(_0x2b2010){}try{let _0x40649a=_0x32f4ee||'',_0x1056a5=/\.\d{3}/g,_0x2b9bb8=_0x40649a['match'](_0x1056a5)[0x0]['split']('.')['filter'](_0x311449=>Boolean(_0x311449));_0xfb7345=_0x2b9bb8['length']>=0x1?Number(_0x2b9bb8[0x0]):undefined;}catch(_0x5e2a0b){}const _0x2e5db8={};return _0x2e5db8['h']=_0x4a17bc,_0x2e5db8['m']=_0x56e360,_0x2e5db8['s']=_0x3330da,_0x2e5db8['ms']=_0xfb7345,_0x2e5db8;}class a0_0x72f0b0{['val']=new Date();static ['glCode']=undefined;['code']=undefined;['dyfrmt']=a0_0xcab0da(this);get['localCode'](){return this['code'];}static['new'](){return new a0_0x72f0b0()['setCode'](a0_0x72f0b0['glCode']);}static['setCode'](_0x49aa22){return a0_0x72f0b0['glCode']=_0x49aa22,this;}static['seperator'](){return a0_0x539804(()=>new Date()['toLocaleDateString'](a0_0x72f0b0['glCode'])['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x539804(()=>a0_0x72f0b0['new']()['setTime'](this['toTime']()));}['setCode'](_0x583f89){return this['code']=_0x583f89,this;}['seperator'](){return a0_0x539804(()=>new Date()['toLocaleDateString'](this['code'])['replace'](/\d/g,'')['split']('')[0x0]);}['zone'](){return a0_0x539804(()=>{return Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x4f207f=this['code']){return a0_0x539804(()=>{return new Intl['Locale'](_0x4f207f)?.['timeZones']||[];},null);}['region'](_0x436645=this['code']){return a0_0x539804(()=>{return new Intl['Locale'](_0x436645)['region'];},null);}['year'](){return this['val']['getFullYear']();}['month'](){return this['val']['getMonth']()+0x1;}['monthUtc'](){return this['val']['getMonth']();}['day'](){return this['val']['getDate']();}['hours'](){return this['val']['getHours']();}['min'](){return this['val']['getMinutes']();}['sec'](){return this['val']['getSeconds']();}['msec'](){return this['val']['getMilliseconds']();}['dayOfWeek'](){const _0x25e6f7=this['val']['getDay']();return _0x25e6f7?_0x25e6f7:0x7;}['dayOfWeekUtc'](){return this['val']['getDay']();}['setYear'](_0x4b2144){return this['val']['setFullYear'](_0x4b2144),this;}['setMonth'](_0x53d6cc){return this['val']['setMonth'](_0x53d6cc-0x1),this;}['setMonthUtc'](_0x43ac3b){return this['val']['setMonth'](_0x43ac3b),this;}['setDay'](_0x125f53){return this['val']['setDate'](_0x125f53),this;}['setHour'](_0x53ce5a){return this['val']['setHours'](_0x53ce5a),this;}['startOfHours'](){return this['setHour'](0x0),this['setMin'](0x0),this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfHours'](){return this['setHour'](0x17),this['setMin'](0x3b),this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setMin'](_0x2526c3){return this['val']['setMinutes'](_0x2526c3),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x4075aa){return this['val']['setSeconds'](_0x4075aa),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x4e9001){return this['val']['setMilliseconds'](_0x4e9001),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x59b67c){return this['val']=new Date(_0x59b67c),this;}['setTime'](_0x54b4a9){return this['val']=new Date(_0x54b4a9),this;}['setDate'](_0x4acad0){return this['val']=new Date(_0x4acad0),this;}['setDateInputValue'](_0xd7dde6){return this['val']=new Date(_0xd7dde6?.['replace']('T','\x20')),this;}['setVal'](_0x29ff1e){return a0_0x539804(()=>{return a0_0x72f0b0['new']()['setTime'](a0_0x57f643(_0x29ff1e));});}['toIsoDate'](){return this['val']['toISOString']();}['toTime'](){return this['val']['getTime']();}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x3d9cf4(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x3d9cf4(this['month']())+'-'+a0_0x3d9cf4(this['day']());}['toTimeInput'](_0x1701ee=!![]){const _0x40238a=[];return _0x40238a['push'](a0_0x3d9cf4(this['hours']())),_0x40238a['push'](a0_0x3d9cf4(this['min']())),_0x1701ee&&_0x40238a['push'](a0_0x3d9cf4(this['sec']())),_0x40238a['join'](':');}['toDateTimeInput'](_0x134732=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x134732);}['strDate'](){const _0x162c01={};return _0x162c01['month']='2-digit',_0x162c01['day']='2-digit',_0x162c01['year']='numeric',this['val']['toLocaleDateString'](this['code'],_0x162c01);}['strDateLocal'](_0xb8d77d){return this['val']['toLocaleDateString'](this['code'],_0xb8d77d);}['strTime'](){return a0_0x3d9cf4(this['hours']())+':'+a0_0x3d9cf4(this['min']())+':'+a0_0x3d9cf4(this['sec']());}['strTimeLocale'](_0x15c1f6){return this['val']['toLocaleTimeString'](this['code'],_0x15c1f6);}['strHHmm'](){return a0_0x3d9cf4(this['hours']())+':'+a0_0x3d9cf4(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x861f6){return this['val']['toLocaleString'](this['code'],_0x861f6);}['strYears'](){return this['val']['getFullYear']()['toString']();}['strMounth'](){return a0_0x3d9cf4(this['month'](),0x2);}['strDay'](){return a0_0x3d9cf4(this['day'](),0x2);}['strHour'](){return a0_0x3d9cf4(this['hours'](),0x2);}['strMin'](){return a0_0x3d9cf4(this['min'](),0x2);}['strSec'](){return a0_0x3d9cf4(this['sec'](),0x2);}['strMsec'](){return a0_0x3d9cf4(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addDay'](_0x175ab7){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x175ab7*0x18)),this;}['addHours'](_0x4e1d07){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x4e1d07)),this;}['addMins'](_0x153d7c){return this['val']=new Date(this['val']['setMinutes'](this['val']['getMinutes']()+_0x153d7c)),this;}['startOfDay'](){return this['startOfHours'](),this;}['cpyByStartOfDay'](){return this['cpy']()['startOfDay']();}['endOfDay'](){return 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['setDate'](this['val'])['startOfMonth']()['setMonth'](this['month']()+0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x354309){return a0_0x539804(()=>{return this['cpy']()['toTime']()===a0_0x57f643(_0x354309);});}['gt'](_0x585673){return a0_0x539804(()=>{return this['cpy']()['toTime']()>a0_0x57f643(_0x585673);});}['gte'](_0x36411b){return a0_0x539804(()=>{return this['cpy']()['toTime']()>=a0_0x57f643(_0x36411b);});}['lt'](_0x247924){return a0_0x539804(()=>{return this['cpy']()['toTime']()<a0_0x57f643(_0x247924);});}['lte'](_0x56f4e8){return a0_0x539804(()=>{return this['cpy']()['toTime']()<=a0_0x57f643(_0x56f4e8);});}['btw'](_0x2e1027,_0x95c491){return a0_0x539804(()=>{const _0x4ddc74=a0_0x57f643(_0x2e1027),_0x327c84=a0_0x57f643(_0x95c491),_0x1549df=this['cpy']()['toTime']();return _0x4ddc74<_0x1549df&&_0x1549df<_0x327c84;});}['btweq'](_0x12d6b7,_0x1a5a1f){return a0_0x539804(()=>{const _0x4c4360=a0_0x57f643(_0x12d6b7),_0x4066fa=a0_0x57f643(_0x1a5a1f),_0x3b627b=this['cpy']()['toTime']();return _0x4c4360<=_0x3b627b&&_0x3b627b<=_0x4066fa;});}['btwEqStart'](_0x35547f,_0x763725){return a0_0x539804(()=>{const _0x571aa6=a0_0x57f643(_0x35547f),_0x4ee354=a0_0x57f643(_0x763725),_0x4fe9b5=this['cpy']()['toTime']();return _0x571aa6<=_0x4fe9b5&&_0x4fe9b5<_0x4ee354;});}['btwEqEnd'](_0xea299c,_0xfca186){return a0_0x539804(()=>{const _0x1e3fdd=a0_0x57f643(_0xea299c),_0x14629f=a0_0x57f643(_0xfca186),_0x109638=this['cpy']()['toTime']();return _0x1e3fdd<_0x109638&&_0x109638<=_0x14629f;});}static['diffDays'](_0x56c295,_0x5831e7,_0x2e87b9){return a0_0x539804(()=>{const _0x5496a8=a0_0x57f643(_0x56c295),_0x3b8481=a0_0x57f643(_0x5831e7);return _0x2e87b9?Math['abs'](_0x5496a8-_0x3b8481)/0x36ee80/0x18:(_0x5496a8-_0x3b8481)/0x36ee80/0x18;});}static['diffHours'](_0x55d9eb,_0x204713,_0x4a532b){return a0_0x539804(()=>{const _0x5eaf6f=a0_0x57f643(_0x55d9eb),_0x411014=a0_0x57f643(_0x204713);return _0x4a532b?Math['abs'](_0x5eaf6f-_0x411014)/0x36ee80:(_0x5eaf6f-_0x411014)/0x36ee80;});}static['diffMins'](_0x377211,_0x3312b2,_0x21625d){return a0_0x539804(()=>{const _0x1a1af2=a0_0x57f643(_0x377211),_0x33e143=a0_0x57f643(_0x3312b2);return _0x21625d?Math['abs'](_0x1a1af2-_0x33e143)/0x3e8/0x3c:(_0x1a1af2-_0x33e143)/0x3e8/0x3c;});}static['diffSecs'](_0x20c3c2,_0x5be7ce,_0x1277e8){return a0_0x539804(()=>{const _0x43ffa4=a0_0x57f643(_0x20c3c2),_0x19e93a=a0_0x57f643(_0x5be7ce);return _0x1277e8?Math['abs'](_0x43ffa4-_0x19e93a)/0x3e8:(_0x43ffa4-_0x19e93a)/0x3e8;});}static['s1'](_0xffb5e3,_0x2734f0,_0x2f4204,_0x44f54a){return a0_0x539804(()=>a0_0x116ac5(_0xffb5e3,_0x2734f0,_0x2f4204,_0x44f54a));}static['divideTime'](_0x30918a){return a0_0x539804(()=>a0_0x5ede8b(_0x30918a));}}exports['MDateUtil']=a0_0x72f0b0;const a0_0x215cd0={};a0_0x215cd0['value']='mdateutil',a0_0x215cd0['writable']=![],a0_0x215cd0['enumerable']=!![],a0_0x215cd0['configurable']=![],Object['defineProperty'](a0_0x72f0b0['prototype'],'idkey',a0_0x215cd0);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x2227c1=this&&this['__createBinding']||(Object['create']?function(_0x295461,_0x10257b,_0xa5ecfb,_0x518978){if(_0x518978===undefined)_0x518978=_0xa5ecfb;var _0x194ac5=Object['getOwnPropertyDescriptor'](_0x10257b,_0xa5ecfb);if(!_0x194ac5||('get'in _0x194ac5?!_0x10257b['__esModule']:_0x194ac5['writable']||_0x194ac5['configurable'])){var _0xd728b0={};_0xd728b0['enumerable']=!![],_0xd728b0['get']=function(){return _0x10257b[_0xa5ecfb];},_0x194ac5=_0xd728b0;}Object['defineProperty'](_0x295461,_0x518978,_0x194ac5);}:function(_0x51d12f,_0x3f29da,_0x71ddc0,_0x3006b0){if(_0x3006b0===undefined)_0x3006b0=_0x71ddc0;_0x51d12f[_0x3006b0]=_0x3f29da[_0x71ddc0];}),a0_0x276e4f=this&&this['__exportStar']||function(_0x21244e,_0x2e8497){for(var _0x320b70 in _0x21244e)if(_0x320b70!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x2e8497,_0x320b70))a0_0x2227c1(_0x2e8497,_0x21244e,_0x320b70);},a0_0x496380={};a0_0x496380['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x496380),a0_0x276e4f(require('./DateUtil'),exports);
|