UNPKG

timezone-dst-info

Version:

Get current datetime, DST status, and UTC offset for a given timezone.

1 lines 2.33 kB
function a0_0x438a(_0x3164fc,_0xa0874f){const _0x1ab651=a0_0x5ea3();return a0_0x438a=function(_0x478c85,_0x32d913){_0x478c85=_0x478c85-0x8b;let _0x5ea3dc=_0x1ab651[_0x478c85];return _0x5ea3dc;},a0_0x438a(_0x3164fc,_0xa0874f);}const a0_0x4a6062=a0_0x438a;(function(_0x49bdaa,_0x46f506){const _0x1c42ce=a0_0x438a,_0x33dafa=_0x49bdaa();while(!![]){try{const _0xfc366d=parseInt(_0x1c42ce(0x8e))/0x1+parseInt(_0x1c42ce(0x98))/0x2*(parseInt(_0x1c42ce(0x8d))/0x3)+parseInt(_0x1c42ce(0x9f))/0x4+parseInt(_0x1c42ce(0x9b))/0x5*(-parseInt(_0x1c42ce(0xa0))/0x6)+-parseInt(_0x1c42ce(0x94))/0x7*(parseInt(_0x1c42ce(0x96))/0x8)+-parseInt(_0x1c42ce(0x90))/0x9*(parseInt(_0x1c42ce(0x93))/0xa)+-parseInt(_0x1c42ce(0x97))/0xb;if(_0xfc366d===_0x46f506)break;else _0x33dafa['push'](_0x33dafa['shift']());}catch(_0x3ef09e){_0x33dafa['push'](_0x33dafa['shift']());}}}(a0_0x5ea3,0xd571b));function a0_0x5ea3(){const _0xb7d6c0=['56FkMurO','1428273fQhZIN','2EGZbvy','offsetNameShort','search','3726635wEnNoa','Invalid\x20or\x20unknown\x20timezone','setZone','exports','6485004HzkJGb','6lpETpm','isInDST','toString','toISO','3533271tfQXxT','709970iqEIWo','luxon','351792XSzWdL','Invalid\x20timezone:\x20must\x20be\x20a\x20string','(((.+)+)+)+$','430wcpMsR','78757hAEgBW','apply'];a0_0x5ea3=function(){return _0xb7d6c0;};return a0_0x5ea3();}const a0_0x32d913=(function(){let _0x28a415=!![];return function(_0x4d393c,_0x31820a){const _0x3cd992=_0x28a415?function(){const _0x99b09c=a0_0x438a;if(_0x31820a){const _0x275689=_0x31820a[_0x99b09c(0x95)](_0x4d393c,arguments);return _0x31820a=null,_0x275689;}}:function(){};return _0x28a415=![],_0x3cd992;};}()),a0_0x478c85=a0_0x32d913(this,function(){const _0x1d66fd=a0_0x438a;return a0_0x478c85[_0x1d66fd(0x8b)]()[_0x1d66fd(0x9a)](_0x1d66fd(0x92))['toString']()['constructor'](a0_0x478c85)[_0x1d66fd(0x9a)](_0x1d66fd(0x92));});a0_0x478c85();const {DateTime}=require(a0_0x4a6062(0x8f));function getTimezoneInfo(_0x3fd8d3){const _0x1ab6f4=a0_0x4a6062;if(typeof _0x3fd8d3!=='string')throw new Error(_0x1ab6f4(0x91));const _0x54f363=DateTime['now']()[_0x1ab6f4(0x9d)](_0x3fd8d3);if(!_0x54f363['isValid'])throw new Error(_0x1ab6f4(0x9c));return{'dateTime':_0x54f363[_0x1ab6f4(0x8c)](),'isDST':_0x54f363[_0x1ab6f4(0xa1)],'offsetUTC':_0x54f363[_0x1ab6f4(0x99)]};}module[a0_0x4a6062(0x9e)]={'getTimezoneInfo':getTimezoneInfo};