mat-date 1.7.57 → 1.7.71
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 +10 -6
- package/dist/DateUtil.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
package/dist/DateUtil.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
1
2
|
interface IStrOptions {
|
|
2
3
|
localeMatcher?: "best fit" | "lookup" | undefined;
|
|
3
4
|
weekday?: "long" | "short" | "narrow" | undefined;
|
|
@@ -15,17 +16,22 @@ interface IStrOptions {
|
|
|
15
16
|
}
|
|
16
17
|
export declare class MDateUtil {
|
|
17
18
|
private val;
|
|
18
|
-
private static glCode;
|
|
19
19
|
private code;
|
|
20
|
+
private _zone;
|
|
20
21
|
private dyfrmt;
|
|
21
22
|
get localCode(): string;
|
|
23
|
+
get zone(): string;
|
|
24
|
+
private init;
|
|
25
|
+
toString(): string;
|
|
22
26
|
static new(): MDateUtil;
|
|
23
27
|
static setCode(code: string): typeof MDateUtil;
|
|
28
|
+
static setZone(zone: string): typeof MDateUtil;
|
|
24
29
|
static seperator(): string;
|
|
25
30
|
cpy(): MDateUtil;
|
|
26
31
|
setCode(code: string): this;
|
|
32
|
+
setZone(zone: string): this;
|
|
27
33
|
seperator(): string;
|
|
28
|
-
|
|
34
|
+
timezone(): string;
|
|
29
35
|
zones(code?: string): string[];
|
|
30
36
|
region(code?: string): string;
|
|
31
37
|
year(): number;
|
|
@@ -60,16 +66,15 @@ export declare class MDateUtil {
|
|
|
60
66
|
setDateInputValue(value: string): this;
|
|
61
67
|
setVal(value: MDateUtil | Date | number | string): MDateUtil;
|
|
62
68
|
toIsoDate(): string;
|
|
69
|
+
toIsoDateZone(): string;
|
|
63
70
|
toTime(): number;
|
|
64
|
-
toDate():
|
|
71
|
+
toDate(): Temporal.ZonedDateTime;
|
|
65
72
|
toDateMounthInput(): string;
|
|
66
73
|
toDateInput(): string;
|
|
67
74
|
toTimeInput(byS?: boolean): string;
|
|
68
75
|
toDateTimeInput(byS?: boolean): string;
|
|
69
76
|
strDate(): string;
|
|
70
|
-
strDateLocal(options: IStrOptions): string;
|
|
71
77
|
strTime(): string;
|
|
72
|
-
strTimeLocale(options: IStrOptions): string;
|
|
73
78
|
strHHmm(): string;
|
|
74
79
|
str(): string;
|
|
75
80
|
strLocal(options: IStrOptions): string;
|
|
@@ -113,7 +118,6 @@ export declare class MDateUtil {
|
|
|
113
118
|
static diffHours(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
114
119
|
static diffMins(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
115
120
|
static diffSecs(before: MDateUtil | Date | number | string, after: MDateUtil | Date | number | string, abs?: boolean): number;
|
|
116
|
-
static s1(m1: MDateUtil | Date | number | string, m2: MDateUtil | Date | number | string, t1: MDateUtil | Date | number | string, t2: MDateUtil | Date | number | string): boolean;
|
|
117
121
|
static divideTime(value: string): {
|
|
118
122
|
h: number;
|
|
119
123
|
m: number;
|
package/dist/DateUtil.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x293aa6={};a0_0x293aa6['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x293aa6),exports['MDateUtil']=void 0x0;const a0_0x4986cd=(_0x245584,_0x5576c4=0x2)=>_0x245584['toString']()['padStart'](_0x5576c4,'0');function a0_0x57bbf0(_0x125aa3,_0x246f18){try{return _0x125aa3();}catch(_0xc17a11){if(_0x246f18)return _0x246f18;throw new Error('UNKNOWN');}}function a0_0x23a3f3(_0x3e3abd){try{if(_0x3e3abd instanceof Date)return _0x3e3abd['getTime']();if(typeof _0x3e3abd==='number')return _0x3e3abd;if(typeof _0x3e3abd==='string')return new Date(_0x3e3abd)['getTime']();if(_0x3e3abd instanceof a0_0x596399)return _0x3e3abd['toTime']();if(_0x3e3abd['idkey']==='mdateutil')return _0x3e3abd['toTime']();return 0x0;}catch(_0x21be4f){throw new Error('ERROR');}}function a0_0x2ed3e3(_0x5ec5c3){function _0x107827(_0x531a40){const _0x231fe4={};return _0x231fe4['weekday']=_0x531a40,a0_0x57bbf0(()=>new Intl['DateTimeFormat'](_0x5ec5c3['localCode'],_0x231fe4)['format'](a0_0x23a3f3(_0x5ec5c3)),'');}function _0x3bc1d1(){return _0x107827('long');}function _0x36aeb5(){return _0x107827('short');}function _0x250ac0(){return _0x107827('narrow');}const _0x2f5e62={};return _0x2f5e62['ln']=_0x3bc1d1,_0x2f5e62['sh']=_0x36aeb5,_0x2f5e62['nr']=_0x250ac0,_0x2f5e62;}function a0_0x5febf6(_0x26abdb,_0x532f3d,_0x32c66c,_0x3d1c69){const _0x1e776a=a0_0x23a3f3(_0x26abdb),_0x47ec64=a0_0x23a3f3(_0x532f3d),_0xdf2d4=a0_0x23a3f3(_0x32c66c),_0x4ab43b=a0_0x23a3f3(_0x3d1c69);return _0xdf2d4<=_0x1e776a&&_0x4ab43b>=_0x1e776a&&_0x4ab43b<=_0x47ec64||_0xdf2d4>=_0x1e776a&&_0xdf2d4<=_0x47ec64&&_0x4ab43b>=_0x47ec64||_0xdf2d4>=_0x1e776a&&_0xdf2d4<=_0x47ec64&&_0x4ab43b<=_0x47ec64||_0xdf2d4<=_0x1e776a&&_0x4ab43b>=_0x47ec64;}function a0_0x23c807(_0xd20671){let _0xd1d18c=undefined,_0x30f713=undefined,_0x3d3805=undefined,_0x3f3f29=undefined;try{const _0x5eb48c=(_0xd20671||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0xd1d18c=_0x5eb48c['length']>=0x1?Number(_0x5eb48c[0x0]):undefined,_0x30f713=_0x5eb48c['length']>=0x2?Number(_0x5eb48c[0x1]):undefined,_0x3d3805=_0x5eb48c['length']>=0x3?Number(_0x5eb48c[0x2]):undefined;}catch(_0x148429){}try{let _0x20f592=_0xd20671||'',_0x49fbac=/\.\d{3}/g,_0x34a08a=_0x20f592['match'](_0x49fbac)[0x0]['split']('.')['filter'](_0x3269bd=>Boolean(_0x3269bd));_0x3f3f29=_0x34a08a['length']>=0x1?Number(_0x34a08a[0x0]):undefined;}catch(_0x156a4c){}const _0x4bca04={};return _0x4bca04['h']=_0xd1d18c,_0x4bca04['m']=_0x30f713,_0x4bca04['s']=_0x3d3805,_0x4bca04['ms']=_0x3f3f29,_0x4bca04;}class a0_0x596399{['val']=new Date();static ['glCode']=undefined;['code']=undefined;['dyfrmt']=a0_0x2ed3e3(this);get['localCode'](){return this['code'];}static['new'](){return new a0_0x596399()['setCode'](a0_0x596399['glCode']);}static['setCode'](_0xf18a7f){return a0_0x596399['glCode']=_0xf18a7f,this;}static['seperator'](){return a0_0x57bbf0(()=>new Date()['toLocaleDateString'](a0_0x596399['glCode'])['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x57bbf0(()=>a0_0x596399['new']()['setTime'](this['toTime']()));}['setCode'](_0x113e79){return this['code']=_0x113e79,this;}['seperator'](){return a0_0x57bbf0(()=>new Date()['toLocaleDateString'](this['code'])['replace'](/\d/g,'')['split']('')[0x0]);}['zone'](){return a0_0x57bbf0(()=>{return Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x31326e=this['code']){return a0_0x57bbf0(()=>{return new Intl['Locale'](_0x31326e)?.['timeZones']||[];},null);}['region'](_0x3b1621=this['code']){return a0_0x57bbf0(()=>{return new Intl['Locale'](_0x3b1621)['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 _0x238dce=this['val']['getDay']();return _0x238dce?_0x238dce:0x7;}['dayOfWeekUtc'](){return this['val']['getDay']();}['setYear'](_0x188e1d){return this['val']['setFullYear'](_0x188e1d),this;}['setMonth'](_0xf68df8){return this['val']['setMonth'](_0xf68df8-0x1),this;}['setMonthUtc'](_0x16dd41){return this['val']['setMonth'](_0x16dd41),this;}['setDay'](_0x1c159c){return this['val']['setDate'](_0x1c159c),this;}['setHour'](_0x1551e3){return this['val']['setHours'](_0x1551e3),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'](_0x20f6c2){return this['val']['setMinutes'](_0x20f6c2),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x346852){return this['val']['setSeconds'](_0x346852),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0xa174e5){return this['val']['setMilliseconds'](_0xa174e5),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x36b1d4){return this['val']=new Date(_0x36b1d4),this;}['setTime'](_0x3c7f2c){return this['val']=new Date(_0x3c7f2c),this;}['setDate'](_0x5abdd9){return this['val']=new Date(_0x5abdd9),this;}['setDateInputValue'](_0x546667){return this['val']=new Date(_0x546667?.['replace']('T','\x20')),this;}['setVal'](_0x5ee64b){return a0_0x57bbf0(()=>{return a0_0x596399['new']()['setTime'](a0_0x23a3f3(_0x5ee64b));});}['toIsoDate'](){return this['val']['toISOString']();}['toTime'](){return this['val']['getTime']();}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x4986cd(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x4986cd(this['month']())+'-'+a0_0x4986cd(this['day']());}['toTimeInput'](_0x11277d=!![]){const _0x30e827=[];return _0x30e827['push'](a0_0x4986cd(this['hours']())),_0x30e827['push'](a0_0x4986cd(this['min']())),_0x11277d&&_0x30e827['push'](a0_0x4986cd(this['sec']())),_0x30e827['join'](':');}['toDateTimeInput'](_0x44e02d=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x44e02d);}['strDate'](){const _0x2216ae={};return _0x2216ae['month']='2-digit',_0x2216ae['day']='2-digit',_0x2216ae['year']='numeric',this['val']['toLocaleDateString'](this['code'],_0x2216ae);}['strDateLocal'](_0x1e7a71){return this['val']['toLocaleDateString'](this['code'],_0x1e7a71);}['strTime'](){return a0_0x4986cd(this['hours']())+':'+a0_0x4986cd(this['min']())+':'+a0_0x4986cd(this['sec']());}['strTimeLocale'](_0x3fea8e){return this['val']['toLocaleTimeString'](this['code'],_0x3fea8e);}['strHHmm'](){return a0_0x4986cd(this['hours']())+':'+a0_0x4986cd(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x1d88f4){return this['val']['toLocaleString'](this['code'],_0x1d88f4);}['strYears'](){return this['val']['getFullYear']()['toString']();}['strMounth'](){return a0_0x4986cd(this['month'](),0x2);}['strDay'](){return a0_0x4986cd(this['day'](),0x2);}['strHour'](){return a0_0x4986cd(this['hours'](),0x2);}['strMin'](){return a0_0x4986cd(this['min'](),0x2);}['strSec'](){return a0_0x4986cd(this['sec'](),0x2);}['strMsec'](){return a0_0x4986cd(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addDay'](_0x3373fe){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x3373fe*0x18)),this;}['addHours'](_0x2ee0ac){return this['val']=new Date(this['val']['setHours'](this['val']['getHours']()+_0x2ee0ac)),this;}['addMins'](_0x5f2fc0){return this['val']=new Date(this['val']['setMinutes'](this['val']['getMinutes']()+_0x5f2fc0)),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['setDate'](this['val'])['startOfMonth']()['setMonth'](this['month']()+0x1)['startOfMonth']()['addDay'](-0x1)['endOfDay'](),this;}['cpyByEndOfMonth'](){return this['cpy']()['endOfMonth']();}['eq'](_0x501d05){return a0_0x57bbf0(()=>{return this['cpy']()['toTime']()===a0_0x23a3f3(_0x501d05);});}['gt'](_0x42e881){return a0_0x57bbf0(()=>{return this['cpy']()['toTime']()>a0_0x23a3f3(_0x42e881);});}['gte'](_0x1338f7){return a0_0x57bbf0(()=>{return this['cpy']()['toTime']()>=a0_0x23a3f3(_0x1338f7);});}['lt'](_0x4e9d1b){return a0_0x57bbf0(()=>{return this['cpy']()['toTime']()<a0_0x23a3f3(_0x4e9d1b);});}['lte'](_0xfbab6a){return a0_0x57bbf0(()=>{return this['cpy']()['toTime']()<=a0_0x23a3f3(_0xfbab6a);});}['btw'](_0x52fed3,_0x3382d9){return a0_0x57bbf0(()=>{const _0x59e9a1=a0_0x23a3f3(_0x52fed3),_0x22cb04=a0_0x23a3f3(_0x3382d9),_0x2da795=this['cpy']()['toTime']();return _0x59e9a1<_0x2da795&&_0x2da795<_0x22cb04;});}['btweq'](_0x585891,_0x4cac62){return a0_0x57bbf0(()=>{const _0x38d501=a0_0x23a3f3(_0x585891),_0x5c1c2b=a0_0x23a3f3(_0x4cac62),_0x33d3cf=this['cpy']()['toTime']();return _0x38d501<=_0x33d3cf&&_0x33d3cf<=_0x5c1c2b;});}['btwEqStart'](_0x25c9cf,_0x2d4128){return a0_0x57bbf0(()=>{const _0x1f19f3=a0_0x23a3f3(_0x25c9cf),_0x2f6656=a0_0x23a3f3(_0x2d4128),_0x5929e9=this['cpy']()['toTime']();return _0x1f19f3<=_0x5929e9&&_0x5929e9<_0x2f6656;});}['btwEqEnd'](_0x24f58e,_0x560fcd){return a0_0x57bbf0(()=>{const _0x2a6dc9=a0_0x23a3f3(_0x24f58e),_0x401d04=a0_0x23a3f3(_0x560fcd),_0x3b315c=this['cpy']()['toTime']();return _0x2a6dc9<_0x3b315c&&_0x3b315c<=_0x401d04;});}static['diffDays'](_0x5981e0,_0x349532,_0x4c073){return a0_0x57bbf0(()=>{const _0x5c660a=a0_0x23a3f3(_0x5981e0),_0x481adb=a0_0x23a3f3(_0x349532);return _0x4c073?Math['abs'](_0x5c660a-_0x481adb)/0x36ee80/0x18:(_0x5c660a-_0x481adb)/0x36ee80/0x18;});}static['diffHours'](_0x2d020e,_0x45e1c4,_0x252d0f){return a0_0x57bbf0(()=>{const _0x928a09=a0_0x23a3f3(_0x2d020e),_0x5286c0=a0_0x23a3f3(_0x45e1c4);return _0x252d0f?Math['abs'](_0x928a09-_0x5286c0)/0x36ee80:(_0x928a09-_0x5286c0)/0x36ee80;});}static['diffMins'](_0x4fd28c,_0x46f195,_0x1a6b98){return a0_0x57bbf0(()=>{const _0x1cf393=a0_0x23a3f3(_0x4fd28c),_0x3388e3=a0_0x23a3f3(_0x46f195);return _0x1a6b98?Math['abs'](_0x1cf393-_0x3388e3)/0x3e8/0x3c:(_0x1cf393-_0x3388e3)/0x3e8/0x3c;});}static['diffSecs'](_0x2f907e,_0xa882eb,_0x330a0b){return a0_0x57bbf0(()=>{const _0x1d2b9b=a0_0x23a3f3(_0x2f907e),_0x5683fa=a0_0x23a3f3(_0xa882eb);return _0x330a0b?Math['abs'](_0x1d2b9b-_0x5683fa)/0x3e8:(_0x1d2b9b-_0x5683fa)/0x3e8;});}static['s1'](_0x29c900,_0x580d8e,_0x54d8a4,_0x4adf1b){return a0_0x57bbf0(()=>a0_0x5febf6(_0x29c900,_0x580d8e,_0x54d8a4,_0x4adf1b));}static['divideTime'](_0x2a6b04){return a0_0x57bbf0(()=>a0_0x23c807(_0x2a6b04));}}exports['MDateUtil']=a0_0x596399;const a0_0x5f2fdc={};a0_0x5f2fdc['value']='mdateutil',a0_0x5f2fdc['writable']=![],a0_0x5f2fdc['enumerable']=!![],a0_0x5f2fdc['configurable']=![],Object['defineProperty'](a0_0x596399['prototype'],'idkey',a0_0x5f2fdc);
|
|
1
|
+
'use strict';const a0_0x265767={};a0_0x265767['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x265767),exports['MDateUtil']=void 0x0;const a0_0x3fcabf=require('@js-temporal/polyfill'),a0_0x2ffd4a=(_0x153f73,_0x238f98=0x2)=>_0x153f73['toString']()['padStart'](_0x238f98,'0');function a0_0x253d72(_0x3fb45c,_0x761724){try{return _0x3fb45c();}catch(_0x38291c){if(_0x761724)return _0x761724;throw new Error('UNKNOWN');}}function a0_0x4dd02f(_0x111df4,_0xa5444){try{if(_0x111df4 instanceof Date)return a0_0x3fcabf['Temporal']['Instant']['fromEpochMilliseconds'](_0x111df4['getTime']())['toZonedDateTimeISO'](_0xa5444)['epochMilliseconds'];if(typeof _0x111df4==='number')return _0x111df4;if(typeof _0x111df4==='string')return a0_0x3fcabf['Temporal']['Instant']['fromEpochMilliseconds'](new Date(_0x111df4)['getTime']())['toZonedDateTimeISO'](_0xa5444)['epochMilliseconds'];if(_0x111df4 instanceof a0_0x450e48)return _0x111df4['toTime']();if(_0x111df4['idkey']==='mdateutil')return _0x111df4['toTime']();return 0x0;}catch(_0x3707e3){throw new Error('ERROR');}}function a0_0x4ac2fc(_0x24960e){function _0x34079a(_0x25816c){const _0x3dee9f={};return _0x3dee9f['weekday']=_0x25816c,a0_0x253d72(()=>new Intl['DateTimeFormat'](_0x24960e['localCode'],_0x3dee9f)['format'](a0_0x4dd02f(_0x24960e,_0x24960e['zone'])),'');}function _0xbf52dc(){return _0x34079a('long');}function _0x5558c5(){return _0x34079a('short');}function _0x5cc68f(){return _0x34079a('narrow');}const _0x518a3c={};return _0x518a3c['ln']=_0xbf52dc,_0x518a3c['sh']=_0x5558c5,_0x518a3c['nr']=_0x5cc68f,_0x518a3c;}function a0_0x7107f0(_0x5ae007){let _0x1a3136=undefined,_0x411e4a=undefined,_0x537109=undefined,_0x2c0181=undefined;try{const _0x2b387a=(_0x5ae007||'')['match'](/\w{2}:\w{2}(:\w{2})?\b/g)[0x0]['split'](':');_0x1a3136=_0x2b387a['length']>=0x1?Number(_0x2b387a[0x0]):undefined,_0x411e4a=_0x2b387a['length']>=0x2?Number(_0x2b387a[0x1]):undefined,_0x537109=_0x2b387a['length']>=0x3?Number(_0x2b387a[0x2]):undefined;}catch(_0x6f7957){}try{let _0x543fbe=_0x5ae007||'',_0x3d2ae1=/\.\d{3}/g,_0x410122=_0x543fbe['match'](_0x3d2ae1)[0x0]['split']('.')['filter'](_0x5edf20=>Boolean(_0x5edf20));_0x2c0181=_0x410122['length']>=0x1?Number(_0x410122[0x0]):undefined;}catch(_0x149a6b){}const _0x37d4aa={};return _0x37d4aa['h']=_0x1a3136,_0x37d4aa['m']=_0x411e4a,_0x37d4aa['s']=_0x537109,_0x37d4aa['ms']=_0x2c0181,_0x37d4aa;}let a0_0x5b1847=Intl['NumberFormat']()['resolvedOptions']()['locale'],a0_0x478f0d=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];class a0_0x450e48{['val'];['code']=Intl['NumberFormat']()['resolvedOptions']()['locale'];['_zone']=Intl['DateTimeFormat']()['resolvedOptions']()['timeZone'];['dyfrmt']=a0_0x4ac2fc(this);get['localCode'](){return this['code'];}get['zone'](){return this['_zone'];}['init'](){return this['val']=a0_0x3fcabf['Temporal']['Instant']['fromEpochMilliseconds'](new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this['dyfrmt']=a0_0x4ac2fc(this),this;}['toString'](){return'TEST';}static['new'](){return new a0_0x450e48()['setCode'](a0_0x5b1847)['setZone'](a0_0x478f0d)['init']();}static['setCode'](_0x518e6b){return a0_0x5b1847=_0x518e6b,this;}static['setZone'](_0x31e453){return a0_0x478f0d=_0x31e453,this;}static['seperator'](){return a0_0x253d72(()=>new Date()['toLocaleDateString'](a0_0x5b1847)['replace'](/\d/g,'')['split']('')[0x0]);}['cpy'](){return a0_0x253d72(()=>a0_0x450e48['new']()['setTime'](this['toTime']()));}['setCode'](_0x1d363a){return this['code']=_0x1d363a,this;}['setZone'](_0x43e2f0){return this['_zone']=_0x43e2f0,this;}['seperator'](){return a0_0x253d72(()=>new Date()['toLocaleDateString'](this['code'])['replace'](/\d/g,'')['split']('')[0x0]);}['timezone'](){return a0_0x253d72(()=>{return this['zone']||Intl['DateTimeFormat']()?.['resolvedOptions']()?.['timeZone'];},null);}['zones'](_0x13fc47=this['code']){return a0_0x253d72(()=>{return new Intl['Locale'](_0x13fc47)?.['timeZones']||[];},null);}['region'](_0x3621e9=this['code']){return a0_0x253d72(()=>{return new Intl['Locale'](_0x3621e9)['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 _0x32f2af=this['val']['dayOfWeek'];return _0x32f2af?_0x32f2af:0x7;}['dayOfWeekUtc'](){return this['val']['dayOfWeek']-0x1;}['setYear'](_0x77f5e8){const _0x3c314d={};return _0x3c314d['year']=_0x77f5e8,this['val']['with'](_0x3c314d),this;}['setMonth'](_0x50447a){const _0xf13e8a={};return _0xf13e8a['month']=_0x50447a,this['val']['with'](_0xf13e8a),this;}['setMonthUtc'](_0x642d50){const _0x1e85de={};return _0x1e85de['month']=_0x642d50+0x1,this['val']['with'](_0x1e85de),this;}['setDay'](_0x283c2f){const _0x3a0f99={};return _0x3a0f99['day']=_0x283c2f,this['val']['with'](_0x3a0f99),this;}['setHour'](_0x1838b4){const _0x3b18a5={};return _0x3b18a5['hour']=_0x1838b4,this['val']['with'](_0x3b18a5),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'](_0x3d329e){const _0x5c6338={};return _0x5c6338['minute']=_0x3d329e,this['val']['with'](_0x5c6338),this;}['startOfMin'](){return this['setSeconds'](0x0),this['setMilliseconds'](0x0),this;}['endOfMin'](){return this['setSeconds'](0x3b),this['setMilliseconds'](0x3e7),this;}['setSeconds'](_0x27085f){const _0x46c91d={};return _0x46c91d['second']=_0x27085f,this['val']['with'](_0x46c91d),this;}['startOfSeconds'](){return this['setMilliseconds'](0x0),this;}['endOfSeconds'](){return this['setMilliseconds'](0x3e7),this;}['setMilliseconds'](_0x36a141){const _0x4fc003={};return _0x4fc003['millisecond']=_0x36a141,this['val']['with'](_0x4fc003),this;}['startOfMilliseconds'](){return this['setMilliseconds'](0x0),this;}['endOfMilliseconds'](){return this['setMilliseconds'](0x3e7),this;}['setIsoDate'](_0x4cc710){return this['val']=a0_0x3fcabf['Temporal']['Instant']['from'](_0x4cc710||new Date()['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setTime'](_0x49d50c){return this['val']=a0_0x3fcabf['Temporal']['Instant']['fromEpochMilliseconds'](_0x49d50c||new Date()['getTime']())['toZonedDateTimeISO'](this['zone']),this;}['setDate'](_0x1af7e4){return this['setIsoDate'](_0x1af7e4?.['toISOString']()),this;}['setDateInputValue'](_0x489b94){return this['val']=a0_0x3fcabf['Temporal']['Instant']['from'](new Date(_0x489b94?.['replace']('T','\x20'))['toISOString']())['toZonedDateTimeISO'](this['zone']),this;}['setVal'](_0x276836){return a0_0x253d72(()=>{return a0_0x450e48['new']()['setTime'](a0_0x4dd02f(_0x276836,this['zone']));});}['toIsoDate'](){return this['val']['toString']()['substring'](0x0,0x17)+'Z';}['toIsoDateZone'](){return this['val']['toString']()['substring'](0x0,0x1d)+'Z';}['toTime'](){return this['val']['epochMilliseconds'];}['toDate'](){return this['val'];}['toDateMounthInput'](){return this['year']()+'-'+a0_0x2ffd4a(this['month']());}['toDateInput'](){return this['year']()+'-'+a0_0x2ffd4a(this['month']())+'-'+a0_0x2ffd4a(this['day']());}['toTimeInput'](_0x174e24=!![]){const _0xdf4a66=[];return _0xdf4a66['push'](a0_0x2ffd4a(this['hours']())),_0xdf4a66['push'](a0_0x2ffd4a(this['min']())),_0x174e24&&_0xdf4a66['push'](a0_0x2ffd4a(this['sec']())),_0xdf4a66['join'](':');}['toDateTimeInput'](_0x2e4903=!![]){return this['toDateInput']()+'T'+this['toTimeInput'](_0x2e4903);}['strDate'](){const _0x509cdc={};return _0x509cdc['month']='2-digit',_0x509cdc['day']='2-digit',_0x509cdc['year']='numeric',this['val']['toLocaleString'](this['code'],_0x509cdc);}['strTime'](){return a0_0x2ffd4a(this['hours']())+':'+a0_0x2ffd4a(this['min']())+':'+a0_0x2ffd4a(this['sec']());}['strHHmm'](){return a0_0x2ffd4a(this['hours']())+':'+a0_0x2ffd4a(this['min']());}['str'](){return this['strDate']()+'\x20'+this['strTime']();}['strLocal'](_0x1b9069){return this['val']['toLocaleString'](this['code'],_0x1b9069);}['strYears'](){return this['val']['year']['toString']();}['strMounth'](){return a0_0x2ffd4a(this['month'](),0x2);}['strDay'](){return a0_0x2ffd4a(this['day'](),0x2);}['strHour'](){return a0_0x2ffd4a(this['hours'](),0x2);}['strMin'](){return a0_0x2ffd4a(this['min'](),0x2);}['strSec'](){return a0_0x2ffd4a(this['sec'](),0x2);}['strMsec'](){return a0_0x2ffd4a(this['msec'](),0x2);}['strDayStr'](){return{'ln':()=>this['dyfrmt']['ln'](),'sh':()=>this['dyfrmt']['sh'](),'nr':()=>this['dyfrmt']['nr']()};}['addDay'](_0x5ed9aa){const _0x349dfd={};return _0x349dfd['days']=_0x5ed9aa,this['val']['add'](_0x349dfd),this;}['addHours'](_0x23487d){const _0x548a54={};return _0x548a54['hours']=_0x23487d,this['val']['add'](_0x548a54),this;}['addMins'](_0x33c092){const _0x4b81b4={};return _0x4b81b4['minutes']=_0x33c092,this['val']['add'](_0x4b81b4),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'](_0x32f1f2){return a0_0x253d72(()=>{return this['cpy']()['toTime']()===a0_0x4dd02f(_0x32f1f2,this['zone']);});}['gt'](_0x59d79d){return a0_0x253d72(()=>{return this['cpy']()['toTime']()>a0_0x4dd02f(_0x59d79d,this['zone']);});}['gte'](_0xf7da0){return a0_0x253d72(()=>{return this['cpy']()['toTime']()>=a0_0x4dd02f(_0xf7da0,this['zone']);});}['lt'](_0x38a125){return a0_0x253d72(()=>{return this['cpy']()['toTime']()<a0_0x4dd02f(_0x38a125,this['zone']);});}['lte'](_0x13b6a4){return a0_0x253d72(()=>{return this['cpy']()['toTime']()<=a0_0x4dd02f(_0x13b6a4,this['zone']);});}['btw'](_0x28340c,_0x22aceb){return a0_0x253d72(()=>{const _0x1014a1=a0_0x4dd02f(_0x28340c,this['zone']),_0x3bc2fa=a0_0x4dd02f(_0x22aceb,this['zone']),_0x225361=this['cpy']()['toTime']();return _0x1014a1<_0x225361&&_0x225361<_0x3bc2fa;});}['btweq'](_0x37c02f,_0x50c9ac){return a0_0x253d72(()=>{const _0x1c5edd=a0_0x4dd02f(_0x37c02f,this['zone']),_0x3b4208=a0_0x4dd02f(_0x50c9ac,this['zone']),_0x59385f=this['cpy']()['toTime']();return _0x1c5edd<=_0x59385f&&_0x59385f<=_0x3b4208;});}['btwEqStart'](_0x1e458f,_0x446af5){return a0_0x253d72(()=>{const _0x2eefb7=a0_0x4dd02f(_0x1e458f,this['zone']),_0xdbfc19=a0_0x4dd02f(_0x446af5,this['zone']),_0x22aa9c=this['cpy']()['toTime']();return _0x2eefb7<=_0x22aa9c&&_0x22aa9c<_0xdbfc19;});}['btwEqEnd'](_0x15e7d8,_0x43a006){return a0_0x253d72(()=>{const _0x3d01cc=a0_0x4dd02f(_0x15e7d8,this['zone']),_0xe9aa61=a0_0x4dd02f(_0x43a006,this['zone']),_0x4d5ab5=this['cpy']()['toTime']();return _0x3d01cc<_0x4d5ab5&&_0x4d5ab5<=_0xe9aa61;});}static['diffDays'](_0x5407ec,_0xb3286e,_0x255592){return a0_0x253d72(()=>{const _0x28ddcf=a0_0x4dd02f(_0x5407ec,a0_0x478f0d),_0x4603f9=a0_0x4dd02f(_0xb3286e,a0_0x478f0d);return _0x255592?Math['abs'](_0x28ddcf-_0x4603f9)/0x36ee80/0x18:(_0x28ddcf-_0x4603f9)/0x36ee80/0x18;});}static['diffHours'](_0x56f3d7,_0x175a69,_0x3578aa){return a0_0x253d72(()=>{const _0x223bc6=a0_0x4dd02f(_0x56f3d7,a0_0x478f0d),_0x2506fd=a0_0x4dd02f(_0x175a69,a0_0x478f0d);return _0x3578aa?Math['abs'](_0x223bc6-_0x2506fd)/0x36ee80:(_0x223bc6-_0x2506fd)/0x36ee80;});}static['diffMins'](_0xbcb633,_0x1c6f9d,_0x16d587){return a0_0x253d72(()=>{const _0x30427b=a0_0x4dd02f(_0xbcb633,a0_0x478f0d),_0x1dabd8=a0_0x4dd02f(_0x1c6f9d,a0_0x478f0d);return _0x16d587?Math['abs'](_0x30427b-_0x1dabd8)/0x3e8/0x3c:(_0x30427b-_0x1dabd8)/0x3e8/0x3c;});}static['diffSecs'](_0x19def0,_0x283e88,_0x8b7b3d){return a0_0x253d72(()=>{const _0x5cf3e4=a0_0x4dd02f(_0x19def0,a0_0x478f0d),_0x4bbc08=a0_0x4dd02f(_0x283e88,a0_0x478f0d);return _0x8b7b3d?Math['abs'](_0x5cf3e4-_0x4bbc08)/0x3e8:(_0x5cf3e4-_0x4bbc08)/0x3e8;});}static['divideTime'](_0x3ba3e2){return a0_0x253d72(()=>a0_0x7107f0(_0x3ba3e2));}}exports['MDateUtil']=a0_0x450e48;const a0_0x337812={};a0_0x337812['value']='mdateutil',a0_0x337812['writable']=![],a0_0x337812['enumerable']=!![],a0_0x337812['configurable']=![],Object['defineProperty'](a0_0x450e48['prototype'],'idkey',a0_0x337812);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x1a8457=this&&this['__createBinding']||(Object['create']?function(_0x1c7342,_0x4fce51,_0x2da120,_0x1f3c2d){if(_0x1f3c2d===undefined)_0x1f3c2d=_0x2da120;var _0x224984=Object['getOwnPropertyDescriptor'](_0x4fce51,_0x2da120);if(!_0x224984||('get'in _0x224984?!_0x4fce51['__esModule']:_0x224984['writable']||_0x224984['configurable'])){var _0x277c19={};_0x277c19['enumerable']=!![],_0x277c19['get']=function(){return _0x4fce51[_0x2da120];},_0x224984=_0x277c19;}Object['defineProperty'](_0x1c7342,_0x1f3c2d,_0x224984);}:function(_0x55fb3a,_0x210284,_0x3915e6,_0x2e5f34){if(_0x2e5f34===undefined)_0x2e5f34=_0x3915e6;_0x55fb3a[_0x2e5f34]=_0x210284[_0x3915e6];}),a0_0x324fa8=this&&this['__exportStar']||function(_0xd231ef,_0x3b7cf7){for(var _0x1c2cbe in _0xd231ef)if(_0x1c2cbe!=='default'&&!Object['prototype']['hasOwnProperty']['call'](_0x3b7cf7,_0x1c2cbe))a0_0x1a8457(_0x3b7cf7,_0xd231ef,_0x1c2cbe);},a0_0x3f2bbe={};a0_0x3f2bbe['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x3f2bbe),a0_0x324fa8(require('./DateUtil'),exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mat-date",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.71",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
29
30
|
"tslib": "^2.5.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|