Socket
Socket
Sign inDemoInstall

dayjs

Package Overview
Dependencies
0
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.35 to 1.8.36

esm/locale/am.js

13

CHANGELOG.md

@@ -0,1 +1,14 @@

## [1.8.36](https://github.com/iamkun/dayjs/compare/v1.8.35...v1.8.36) (2020-09-17)
### Bug Fixes
* Add Amharic (am) locale ([#1046](https://github.com/iamkun/dayjs/issues/1046)) ([cdc49a1](https://github.com/iamkun/dayjs/commit/cdc49a1911c74b7ea96ed222f42796d53715cfed))
* Export Duration type in duration plugin ([#1043](https://github.com/iamkun/dayjs/issues/1043)) ([0f20c3a](https://github.com/iamkun/dayjs/commit/0f20c3ac75d9ac1026a15a7bb343d3a150d9b30f))
* Fix duration plugin parsing milliseconds bug ([#1042](https://github.com/iamkun/dayjs/issues/1042)) ([fe2301b](https://github.com/iamkun/dayjs/commit/fe2301b22318886aaa89ed1620e0a118e98c2b8a))
* Timezone plugin set default timezone ([#1033](https://github.com/iamkun/dayjs/issues/1033)) ([0c2050a](https://github.com/iamkun/dayjs/commit/0c2050a152da708b01edd6150a5013f642b14576))
* Timezone plugin should have the same behavior in latest ICU version ([#1032](https://github.com/iamkun/dayjs/issues/1032)) ([de31592](https://github.com/iamkun/dayjs/commit/de315921575cc50c38464b27d0338e30a54d8e2a))
* Update Finnish (fi) locale ([#963](https://github.com/iamkun/dayjs/issues/963)) ([cf8b6a0](https://github.com/iamkun/dayjs/commit/cf8b6a096f24b54cbdb95675ac386d8ac85ea616))
* Update Polish (pl) , Hungarian (hr) and Lithuanian (lt) localization ([#1045](https://github.com/iamkun/dayjs/issues/1045)) ([638fd39](https://github.com/iamkun/dayjs/commit/638fd394fc24f4188390faf387da6b156e7c6320))
## [1.8.35](https://github.com/iamkun/dayjs/compare/v1.8.34...v1.8.35) (2020-09-02)

@@ -2,0 +15,0 @@

1

esm/locale/bi.js

@@ -0,1 +1,2 @@

// Bislama [bi]
import dayjs from '../index';

@@ -2,0 +3,0 @@ var locale = {

@@ -0,1 +1,2 @@

// English [en]
// We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale

@@ -2,0 +3,0 @@ export default {

12

esm/locale/fi.js

@@ -77,9 +77,9 @@ // Finnish [fi]

L: 'DD.MM.YYYY',
LL: 'Do MMMM[ta] YYYY',
LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
LL: 'D. MMMM[ta] YYYY',
LLL: 'D. MMMM[ta] YYYY, [klo] HH.mm',
LLLL: 'dddd, D. MMMM[ta] YYYY, [klo] HH.mm',
l: 'D.M.YYYY',
ll: 'Do MMM YYYY',
lll: 'Do MMM YYYY, [klo] HH.mm',
llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
ll: 'D. MMM YYYY',
lll: 'D. MMM YYYY, [klo] HH.mm',
llll: 'ddd, D. MMM YYYY, [klo] HH.mm'
}

@@ -86,0 +86,0 @@ };

// Croatian [hr]
import dayjs from '../index';
var monthFormat = 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_');
var monthStandalone = 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_');
var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
var months = function months(dayjsInstance, format) {
if (MONTHS_IN_FORMAT.test(format)) {
return monthFormat[dayjsInstance.month()];
}
return monthStandalone[dayjsInstance.month()];
};
months.s = monthStandalone;
months.f = monthFormat;
var locale = {
name: 'hr',
weekdays: 'Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota'.split('_'),
weekdaysShort: 'Ned._Pon._Uto._Sri._Čet._Pet._Sub.'.split('_'),
weekdaysMin: 'Ne_Po_Ut_Sr_Če_Pe_Su'.split('_'),
months: 'Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac'.split('_'),
monthsShort: 'Sij._Velj._Ožu._Tra._Svi._Lip._Srp._Kol._Ruj._Lis._Stu._Pro.'.split('_'),
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
months: months,
monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
weekStart: 1,

@@ -11,0 +25,0 @@ formats: {

// Lithuanian [lt]
import dayjs from '../index';
var monthFormat = 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_');
var monthStandalone = 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'); // eslint-disable-next-line no-useless-escape
var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/;
var months = function months(dayjsInstance, format) {
if (MONTHS_IN_FORMAT.test(format)) {
return monthFormat[dayjsInstance.month()];
}
return monthStandalone[dayjsInstance.month()];
};
months.s = monthStandalone;
months.f = monthFormat;
var locale = {

@@ -8,3 +23,3 @@ name: 'lt',

weekdaysMin: 's_p_a_t_k_pn_š'.split('_'),
months: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
months: months,
monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),

@@ -11,0 +26,0 @@ ordinal: function ordinal(n) {

@@ -36,8 +36,22 @@ // Polish [pl]

var monthFormat = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
var monthStandalone = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
var MONTHS_IN_FORMAT = /D MMMM/;
var months = function months(dayjsInstance, format) {
if (MONTHS_IN_FORMAT.test(format)) {
return monthFormat[dayjsInstance.month()];
}
return monthStandalone[dayjsInstance.month()];
};
months.s = monthStandalone;
months.f = monthFormat;
var locale = {
name: 'pl',
weekdays: 'Niedziela_Poniedziałek_Wtorek_Środa_Czwartek_Piątek_Sobota'.split('_'),
weekdaysShort: 'Ndz_Pon_Wt_Śr_Czw_Pt_Sob'.split('_'),
weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
months: 'Styczeń_Luty_Marzec_Kwiecień_Maj_Czerwiec_Lipiec_Sierpień_Wrzesień_Październik_Listopad_Grudzień'.split('_'),
months: months,
monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),

@@ -44,0 +58,0 @@ ordinal: function ordinal(n) {

import { PluginFunc } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin
export default plugin

@@ -9,3 +9,3 @@ type DurationInputType = string | number | object

declare class Duration {
export declare class Duration {
constructor (input: DurationInputType, unit?: string, locale?: string)

@@ -12,0 +12,0 @@

@@ -1,2 +0,2 @@

import { MILLISECONDS_A_WEEK, MILLISECONDS_A_DAY, MILLISECONDS_A_HOUR, MILLISECONDS_A_MINUTE, MILLISECONDS_A_SECOND } from '../../constant';
import { MILLISECONDS_A_DAY, MILLISECONDS_A_HOUR, MILLISECONDS_A_MINUTE, MILLISECONDS_A_SECOND, MILLISECONDS_A_WEEK } from '../../constant';
var MILLISECONDS_A_YEAR = MILLISECONDS_A_DAY * 365;

@@ -12,2 +12,3 @@ var MILLISECONDS_A_MONTH = MILLISECONDS_A_DAY * 30;

seconds: MILLISECONDS_A_SECOND,
milliseconds: 1,
weeks: MILLISECONDS_A_WEEK

@@ -14,0 +15,0 @@ };

@@ -11,2 +11,3 @@ var typeToPos = {

export default (function (o, c, d) {
var defaultTimezone;
var localUtcOffset = d().utcOffset();

@@ -38,5 +39,9 @@

}
}
} // Workaround for the same behavior in different node version
// https://github.com/nodejs/node/issues/33027
var utcString = filled[0] + "-" + filled[1] + "-" + filled[2] + " " + filled[3] + ":" + filled[4] + ":" + filled[5] + ":000";
var hour = filled[3];
var fixedHour = hour === 24 ? 0 : hour;
var utcString = filled[0] + "-" + filled[1] + "-" + filled[2] + " " + fixedHour + ":" + filled[4] + ":" + filled[5] + ":000";
var utcTs = d.utc(utcString).valueOf();

@@ -47,13 +52,20 @@ var asTS = +date;

return (utcTs - asTS) / (60 * 1000);
};
}; // find the right offset a given local time. The o input is our guess, which determines which
// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)
// https://github.com/moment/luxon/blob/master/src/datetime.js#L76
var fixOffset = function fixOffset(localTS, o0, tz) {
var utcGuess = localTS - o0 * 60 * 1000;
var o2 = tzOffset(utcGuess, tz);
// Our UTC time is just a guess because our offset is just a guess
var utcGuess = localTS - o0 * 60 * 1000; // Test whether the zone matches the offset for this ts
var o2 = tzOffset(utcGuess, tz); // If so, offset didn't change and we're done
if (o0 === o2) {
return [utcGuess, o0];
}
} // If not, change the ts by the difference in the offset
utcGuess -= (o2 - o0) * 60 * 1000;
utcGuess -= (o2 - o0) * 60 * 1000; // If that gives us the local time we want, we're done
var o3 = tzOffset(utcGuess, tz);

@@ -63,4 +75,6 @@

return [utcGuess, o2];
}
} // If it's different, we're in a hole time.
// The offset has changed, but the we don't adjust the time
return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];

@@ -72,2 +86,6 @@ };

proto.tz = function (timezone) {
if (timezone === void 0) {
timezone = defaultTimezone;
}
var target = this.toDate().toLocaleString('en-US', {

@@ -81,2 +99,6 @@ timeZone: timezone

d.tz = function (input, timezone) {
if (timezone === void 0) {
timezone = defaultTimezone;
}
var previousOffset = tzOffset(+d(), timezone);

@@ -103,2 +125,6 @@ var localTs;

};
d.tz.setDefault = function (timezone) {
defaultTimezone = timezone;
};
});

@@ -1,1 +0,1 @@

!function(u,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):u.dayjs_locale_fi=e(u.dayjs)}(this,function(u){"use strict";function e(u,e,t,n){var i={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"päivä",dd:"%d päivää",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän".split("_")},a={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"päivän",dd:"%d päivän",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän".split("_")},s=n&&!e?a:i,_=s[t];return u<10?_.replace("%d",s.numbers[u]):_.replace("%d",u)}u=u&&u.hasOwnProperty("default")?u.default:u;var t={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),ordinal:function(u){return u+"."},weekStart:1,relativeTime:{future:"%s päästä",past:"%s sitten",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"}};return u.locale(t,null,!0),t});
!function(u,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):u.dayjs_locale_fi=e(u.dayjs)}(this,function(u){"use strict";function e(u,e,t,n){var i={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"päivä",dd:"%d päivää",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän".split("_")},a={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"päivän",dd:"%d päivän",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän".split("_")},s=n&&!e?a:i,_=s[t];return u<10?_.replace("%d",s.numbers[u]):_.replace("%d",u)}u=u&&u.hasOwnProperty("default")?u.default:u;var t={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),ordinal:function(u){return u+"."},weekStart:1,relativeTime:{future:"%s päästä",past:"%s sitten",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};return u.locale(t,null,!0),t});

@@ -1,1 +0,1 @@

!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):e.dayjs_locale_hr=a(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var a={name:"hr",weekdays:"Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota".split("_"),weekdaysShort:"Ned._Pon._Uto._Sri._Čet._Pet._Sub.".split("_"),weekdaysMin:"Ne_Po_Ut_Sr_Če_Pe_Su".split("_"),months:"Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac".split("_"),monthsShort:"Sij._Velj._Ožu._Tra._Svi._Lip._Srp._Kol._Ruj._Lis._Stu._Pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(e){return e+"."}};return e.locale(a,null,!0),a});
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):e.dayjs_locale_hr=a(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var a="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),t="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,_=function(e,_){return s.test(_)?a[e.month()]:t[e.month()]};_.s=t,_.f=a;var n={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:_,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(e){return e+"."}};return e.locale(n,null,!0),n});

@@ -1,1 +0,1 @@

!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):e.dayjs_locale_lt=s(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var s={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"menesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};return e.locale(s,null,!0),s});
!function(s,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):s.dayjs_locale_lt=e(s.dayjs)}(this,function(s){"use strict";s=s&&s.hasOwnProperty("default")?s.default:s;var e="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),i="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),d=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,a=function(s,a){return d.test(a)?e[s.month()]:i[s.month()]};a.s=i,a.f=e;var M={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:a,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(s){return s+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"menesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};return s.locale(M,null,!0),M});

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):e.dayjs_locale_pl=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function i(e,i,r){var n=e+" ";switch(r){case"m":return i?"minuta":"minutę";case"mm":return n+(t(e)?"minuty":"minut");case"h":return i?"godzina":"godzinę";case"hh":return n+(t(e)?"godziny":"godzin");case"MM":return n+(t(e)?"miesiące":"miesięcy");case"yy":return n+(t(e)?"lata":"lat")}}e=e&&e.hasOwnProperty("default")?e.default:e;var r={name:"pl",weekdays:"Niedziela_Poniedziałek_Wtorek_Środa_Czwartek_Piątek_Sobota".split("_"),weekdaysShort:"Ndz_Pon_Wt_Śr_Czw_Pt_Sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:"Styczeń_Luty_Marzec_Kwiecień_Maj_Czerwiec_Lipiec_Sierpień_Wrzesień_Październik_Listopad_Grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:i,y:"rok",yy:i},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return e.locale(r,null,!0),r});
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],i):e.dayjs_locale_pl=i(e.dayjs)}(this,function(e){"use strict";function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function t(e,t,a){var n=e+" ";switch(a){case"m":return t?"minuta":"minutę";case"mm":return n+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return n+(i(e)?"godziny":"godzin");case"MM":return n+(i(e)?"miesiące":"miesięcy");case"yy":return n+(i(e)?"lata":"lat")}}e=e&&e.hasOwnProperty("default")?e.default:e;var a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),n="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),_=/D MMMM/,r=function(e,i){return _.test(i)?a[e.month()]:n[e.month()]};r.s=n,r.f=a;var s={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:r,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:t,mm:t,h:t,hh:t,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:t,y:"rok",yy:t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return e.locale(s,null,!0),s});
{
"name": "dayjs",
"version": "1.8.35",
"version": "1.8.36",
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",

@@ -5,0 +5,0 @@ "main": "dayjs.min.js",

import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
export default plugin

@@ -9,3 +9,3 @@ type DurationInputType = string | number | object

declare class Duration {
export declare class Duration {
constructor (input: DurationInputType, unit?: string, locale?: string)

@@ -12,0 +12,0 @@

@@ -1,1 +0,1 @@

!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.dayjs_plugin_duration=s()}(this,function(){"use strict";var t,s,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,i={years:31536e6,months:2592e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,weeks:6048e5},e=function(t){return t instanceof u},r=function(t,s,n){return new u(t,n,s.$l)},o=function(t){return s.p(t)+"s"},u=function(){function s(t,s,e){var u=this;if(this.$d={},this.$l=e,s)return r(t*i[o(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(s){u.$d[o(s)]=t[s]}),this.calMilliseconds(),this;if("string"==typeof t){var h=t.match(n);if(h)return this.$d.years=h[2],this.$d.months=h[3],this.$d.weeks=h[4],this.$d.days=h[5],this.$d.hours=h[6],this.$d.minutes=h[7],this.$d.seconds=h[8],this.calMilliseconds(),this}return this}var u=s.prototype;return u.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(s,n){return s+(t.$d[n]||0)*(i[n]||1)},0)},u.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=Math.floor(t/31536e6),t%=31536e6,this.$d.months=Math.floor(t/2592e6),t%=2592e6,this.$d.days=Math.floor(t/864e5),t%=864e5,this.$d.hours=Math.floor(t/36e5),t%=36e5,this.$d.minutes=Math.floor(t/6e4),t%=6e4,this.$d.seconds=Math.floor(t/1e3),t%=1e3,this.$d.milliseconds=t},u.toISOString=function(){var t=this.$d.years?this.$d.years+"Y":"",s=this.$d.months?this.$d.months+"M":"",n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=n?n+"D":"",e=this.$d.hours?this.$d.hours+"H":"",r=this.$d.minutes?this.$d.minutes+"M":"",o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=o?o+"S":"",h="P"+t+s+i+(e||r||u?"T":"")+e+r+u;return"P"===h?"P0D":h},u.toJSON=function(){return this.toISOString()},u.as=function(t){return this.$ms/(i[o(t)]||1)},u.get=function(t){var s=this.$ms,n=o(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?Math.floor(s/i[n]):this.$d[n],s},u.add=function(t,s,n){var u;return u=s?t*i[o(s)]:e(t)?t.$ms:r(t,this).$ms,r(this.$ms+u*(n?-1:1),this)},u.subtract=function(t,s){return this.add(t,s,!0)},u.locale=function(t){var s=this.clone();return s.$l=t,s},u.clone=function(){return r(this.$ms,this)},u.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},u.milliseconds=function(){return this.get("milliseconds")},u.asMilliseconds=function(){return this.as("milliseconds")},u.seconds=function(){return this.get("seconds")},u.asSeconds=function(){return this.as("seconds")},u.minutes=function(){return this.get("minutes")},u.asMinutes=function(){return this.as("minutes")},u.hours=function(){return this.get("hours")},u.asHours=function(){return this.as("hours")},u.days=function(){return this.get("days")},u.asDays=function(){return this.as("days")},u.weeks=function(){return this.get("weeks")},u.asWeeks=function(){return this.as("weeks")},u.months=function(){return this.get("months")},u.asMonths=function(){return this.as("months")},u.years=function(){return this.get("years")},u.asYears=function(){return this.as("years")},s}();return function(n,i,o){t=o,s=o().$utils(),o.duration=function(t,s){var n=o.locale();return r(t,{$l:n},s)},o.isDuration=e}});
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.dayjs_plugin_duration=s()}(this,function(){"use strict";var t,s,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,i={years:31536e6,months:2592e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},e=function(t){return t instanceof u},r=function(t,s,n){return new u(t,n,s.$l)},o=function(t){return s.p(t)+"s"},u=function(){function s(t,s,e){var u=this;if(this.$d={},this.$l=e,s)return r(t*i[o(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(s){u.$d[o(s)]=t[s]}),this.calMilliseconds(),this;if("string"==typeof t){var h=t.match(n);if(h)return this.$d.years=h[2],this.$d.months=h[3],this.$d.weeks=h[4],this.$d.days=h[5],this.$d.hours=h[6],this.$d.minutes=h[7],this.$d.seconds=h[8],this.calMilliseconds(),this}return this}var u=s.prototype;return u.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(s,n){return s+(t.$d[n]||0)*(i[n]||1)},0)},u.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=Math.floor(t/31536e6),t%=31536e6,this.$d.months=Math.floor(t/2592e6),t%=2592e6,this.$d.days=Math.floor(t/864e5),t%=864e5,this.$d.hours=Math.floor(t/36e5),t%=36e5,this.$d.minutes=Math.floor(t/6e4),t%=6e4,this.$d.seconds=Math.floor(t/1e3),t%=1e3,this.$d.milliseconds=t},u.toISOString=function(){var t=this.$d.years?this.$d.years+"Y":"",s=this.$d.months?this.$d.months+"M":"",n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=n?n+"D":"",e=this.$d.hours?this.$d.hours+"H":"",r=this.$d.minutes?this.$d.minutes+"M":"",o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=o?o+"S":"",h="P"+t+s+i+(e||r||u?"T":"")+e+r+u;return"P"===h?"P0D":h},u.toJSON=function(){return this.toISOString()},u.as=function(t){return this.$ms/(i[o(t)]||1)},u.get=function(t){var s=this.$ms,n=o(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?Math.floor(s/i[n]):this.$d[n],s},u.add=function(t,s,n){var u;return u=s?t*i[o(s)]:e(t)?t.$ms:r(t,this).$ms,r(this.$ms+u*(n?-1:1),this)},u.subtract=function(t,s){return this.add(t,s,!0)},u.locale=function(t){var s=this.clone();return s.$l=t,s},u.clone=function(){return r(this.$ms,this)},u.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},u.milliseconds=function(){return this.get("milliseconds")},u.asMilliseconds=function(){return this.as("milliseconds")},u.seconds=function(){return this.get("seconds")},u.asSeconds=function(){return this.as("seconds")},u.minutes=function(){return this.get("minutes")},u.asMinutes=function(){return this.as("minutes")},u.hours=function(){return this.get("hours")},u.asHours=function(){return this.as("hours")},u.days=function(){return this.get("days")},u.asDays=function(){return this.as("days")},u.weeks=function(){return this.get("weeks")},u.asWeeks=function(){return this.as("weeks")},u.months=function(){return this.get("months")},u.asMonths=function(){return this.as("months")},u.years=function(){return this.get("years")},u.asYears=function(){return this.as("years")},s}();return function(n,i,o){t=o,s=o().$utils(),o.duration=function(t,s){var n=o.locale();return r(t,{$l:n},s)},o.isDuration=e}});

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.dayjs_plugin_timezone=e()}(this,function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5};return function(e,n,r){var i=r().utcOffset(),o=function(e,n){for(var i=new Date(e),o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),u=[],a=0;a<o.length;a+=1){var f=o[a],s=f.type,m=f.value,c=t[s];c>=0&&(u[c]=parseInt(m,10))}var d=u[0]+"-"+u[1]+"-"+u[2]+" "+u[3]+":"+u[4]+":"+u[5]+":000",v=+i;return(r.utc(d).valueOf()-(v-=v%1e3))/6e4};n.prototype.tz=function(t){var e=this.toDate().toLocaleString("en-US",{timeZone:t}),n=Math.round((this.toDate()-new Date(e))/1e3/60);return r(e).utcOffset(i-n,!0).$set("ms",this.$ms)},r.tz=function(t,e){var n,i=o(+r(),e);"string"!=typeof t&&(n=r(t)+60*i*1e3);var u=function(t,e,n){var r=t-60*e*1e3,i=o(r,n);if(e===i)return[r,e];var u=o(r-=60*(i-e)*1e3,n);return i===u?[r,i]:[t-60*Math.min(i,u)*1e3,Math.max(i,u)]}(n=n||r.utc(t).valueOf(),i,e),a=u[0],f=u[1];return r(a).utcOffset(f)},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.dayjs_plugin_timezone=e()}(this,function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5};return function(e,n,i){var o,r=i().utcOffset(),u=function(e,n){for(var o=new Date(e),r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(o),u=[],a=0;a<r.length;a+=1){var f=r[a],s=f.type,d=f.value,c=t[s];c>=0&&(u[c]=parseInt(d,10))}var m=u[3],v=24===m?0:m,h=u[0]+"-"+u[1]+"-"+u[2]+" "+v+":"+u[4]+":"+u[5]+":000",l=+o;return(i.utc(h).valueOf()-(l-=l%1e3))/6e4};n.prototype.tz=function(t){void 0===t&&(t=o);var e=this.toDate().toLocaleString("en-US",{timeZone:t}),n=Math.round((this.toDate()-new Date(e))/1e3/60);return i(e).utcOffset(r-n,!0).$set("ms",this.$ms)},i.tz=function(t,e){void 0===e&&(e=o);var n,r=u(+i(),e);"string"!=typeof t&&(n=i(t)+60*r*1e3);var a=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(n=n||i.utc(t).valueOf(),r,e),f=a[0],s=a[1];return i(f).utcOffset(s)},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(t){o=t}}});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc