Socket
Socket
Sign inDemoInstall

dayjs

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dayjs - npm Package Compare versions

Comparing version 1.8.19 to 1.8.20

esm/locale/bi.js

12

CHANGELOG.md

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

## [1.8.20](https://github.com/iamkun/dayjs/compare/v1.8.19...v1.8.20) (2020-02-04)
### Bug Fixes
* Add Bislama Locale (bi) ([#780](https://github.com/iamkun/dayjs/issues/780)) ([9ac6ab4](https://github.com/iamkun/dayjs/commit/9ac6ab481bc883dd4ecc02caab12c8b2fc218a42))
* Fix weekOfYear plugin to support yearStart locale for better week number result ([#769](https://github.com/iamkun/dayjs/issues/769)) ([f00db36](https://github.com/iamkun/dayjs/commit/f00db36e70bc7beaca1abadeb30a9b1fbb3261ee))
* Update et (Estonian) locale relativeTime ([#790](https://github.com/iamkun/dayjs/issues/790)) ([d8e0f45](https://github.com/iamkun/dayjs/commit/d8e0f45f6cd2d5e5704b9797929227454c92d1a5))
* Update LocaleData plugin to support dayjs.localeData().weekdays() API ([287fed6](https://github.com/iamkun/dayjs/commit/287fed6db9eb4fd979b4861aca4dacbd32422533)), closes [#779](https://github.com/iamkun/dayjs/issues/779)
* Update LocaleData plugin to support dayjs.months dayjs.weekdays API ([144c2ae](https://github.com/iamkun/dayjs/commit/144c2ae6e15fbf89e3acd7c8cb9e237c5f6e1348)), closes [#779](https://github.com/iamkun/dayjs/issues/779)
* Update pl locale fusional config ([d372475](https://github.com/iamkun/dayjs/commit/d3724758bb27d5b17587b995ba14e7e80dcd1151))
## [1.8.19](https://github.com/iamkun/dayjs/compare/v1.8.18...v1.8.19) (2020-01-06)

@@ -2,0 +14,0 @@

1

esm/locale/af.js

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

// Afrikaans [af]
import dayjs from '../index';

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

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

// Arabic (Algeria) [ar-dz]
import dayjs from '../index';

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

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

// Arabic (Kuwait) [ar-kw]
import dayjs from '../index';

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

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

// Arabic (Lybia) [ar-ly]
import dayjs from '../index';

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

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

// Arabic (Morocco) [ar-ma]
import dayjs from '../index';

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

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

// Arabic (Saudi Arabia) [ar-sa]
import dayjs from '../index';

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

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

// Arabic (Tunisia) [ar-tn]
import dayjs from '../index';

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

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

// Arabic [ar]
import dayjs from '../index';

@@ -2,0 +3,0 @@ var months = 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_');

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

// Azerbaijani [az]
import dayjs from '../index';

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

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

// Belarusian [be]
import dayjs from '../index';

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

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

// Bulgarian [bg]
import dayjs from '../index';

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

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

// Bambara [bm]
import dayjs from '../index';

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

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

// Bengali [bn]
import dayjs from '../index';

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

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

// Tibetan [bo]
import dayjs from '../index';

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

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

// Breton [br]
import dayjs from '../index';

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

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

// Bosnian [bs]
import dayjs from '../index';

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

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

// Catalan [ca]
import dayjs from '../index';

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

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

// Czech [cs]
import dayjs from '../index';

@@ -2,0 +3,0 @@

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

// Chuvash [cv]
import dayjs from '../index';

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

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

// Welsh [cy]
import dayjs from '../index';

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

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

// Danish [da]
import dayjs from '../index';

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

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

// German (Austria) [de-at]
import dayjs from '../index';

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

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

// German (Switzerland) [de-ch]
import dayjs from '../index';

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

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

// German [de]
import dayjs from '../index';

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

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

// Maldivian [dv]
import dayjs from '../index';

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

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

// Greek [el]
import dayjs from '../index';

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

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

// English (Australia) [en-au]
import dayjs from '../index';

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

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

// English (Canada) [en-ca]
import dayjs from '../index';

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

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

// English (United Kingdom) [en-gb]
import dayjs from '../index';

@@ -10,2 +11,3 @@ var locale = {

weekStart: 1,
yearStart: 4,
relativeTime: {

@@ -12,0 +14,0 @@ future: 'in %s',

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

// English (Ireland) [en-ie]
import dayjs from '../index';

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

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

// English (Israel) [en-il]
import dayjs from '../index';

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

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

// English (New Zealand) [en-nz]
import dayjs from '../index';

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

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

// English (Singapore) [en-sg]
import dayjs from '../index';

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

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

// Esperanto [eo]
import dayjs from '../index';

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

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

// Spanish (Dominican Republic) [es-do]
import dayjs from '../index';

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

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

// Spanish (United States) [es-us]
import dayjs from '../index';

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

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

// Spanish [es]
import dayjs from '../index';

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

63

esm/locale/et.js

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

// Estonian [et]
import dayjs from '../index';
function relativeTimeWithTense(number, withoutSuffix, key, isFuture) {
var format = {
s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
m: ['ühe minuti', 'üks minut'],
mm: ['%d minuti', '%d minutit'],
h: ['ühe tunni', 'tund aega', 'üks tund'],
hh: ['%d tunni', '%d tundi'],
d: ['ühe päeva', 'üks päev'],
M: ['kuu aja', 'kuu aega', 'üks kuu'],
MM: ['%d kuu', '%d kuud'],
y: ['ühe aasta', 'aasta', 'üks aasta'],
yy: ['%d aasta', '%d aastat']
};
if (withoutSuffix) {
return (format[key][2] ? format[key][2] : format[key][1]).replace('%d', number);
}
return (isFuture ? format[key][0] : format[key][1]).replace('%d', number);
}
var locale = {

@@ -17,36 +40,16 @@ name: 'et',

weekStart: 1,
/*
* This relativeTime is currently configured for having proper past
* tense forms since Estonian needs a separate version for future tense
* and I think past tense is a more common use case for this kind of library.
*
* Doing this properly requires this issue to be fixed:
* https://github.com/iamkun/dayjs/issues/302
*/
relativeTime: {
future: '%s pärast',
past: '%s tagasi',
s: 'mõni sekund',
// for past tense
m: 'minut',
// for past tense
mm: '%d minutit',
// for past tense
h: 'tund',
// for past tense
hh: '%d tundi',
// for past tense
d: 'päev',
// for past tense
s: relativeTimeWithTense,
m: relativeTimeWithTense,
mm: relativeTimeWithTense,
h: relativeTimeWithTense,
hh: relativeTimeWithTense,
d: relativeTimeWithTense,
dd: '%d päeva',
// for past tense
M: 'kuu',
// for past tense
MM: '%d kuud',
// for past tense
y: 'aasta',
// for past tense
yy: '%d aastat' // for past tense
M: relativeTimeWithTense,
MM: relativeTimeWithTense,
y: relativeTimeWithTense,
yy: relativeTimeWithTense
},

@@ -53,0 +56,0 @@ formats: {

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

// Basque [eu]
import dayjs from '../index';

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

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

// Persian [fa]
import dayjs from '../index';

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

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

// Finnish [fi]
import dayjs from '../index';

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

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

// Faroese [fo]
import dayjs from '../index';

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

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

// French (Canada) [fr-ca]
import dayjs from '../index';

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

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

// French (Switzerland) [fr-ch]
import dayjs from '../index';

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

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

// French [fr]
import dayjs from '../index';

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

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

// Frisian [fy]
import dayjs from '../index';

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

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

// Irish or Irish Gaelic [ga]
import dayjs from '../index';

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

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

// Scottish Gaelic [gd]
import dayjs from '../index';

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

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

// Galician [gl]
import dayjs from '../index';

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

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

// Konkani Latin script [gom-latn]
import dayjs from '../index';

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

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

// Gujarati [gu]
import dayjs from '../index';

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

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

// Hebrew [he]
import dayjs from '../index';

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

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

// Hindi [hi]
import dayjs from '../index';

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

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

// Croatian [hr]
import dayjs from '../index';

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

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

// Hungarian [hu]
import dayjs from '../index';

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

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

// Armenian [hy-am]
import dayjs from '../index';

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

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

// Indonesian [id]
import dayjs from '../index';

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

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

// Icelandic [is]
import dayjs from '../index';

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

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

// Italian (Switzerland) [it-ch]
import dayjs from '../index';

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

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

// Italian [it]
import dayjs from '../index';

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

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

// Japanese [ja]
import dayjs from '../index';

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

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

// Javanese [jv]
import dayjs from '../index';

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

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

// Georgian [ka]
import dayjs from '../index';

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

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

// Kazakh [kk]
import dayjs from '../index';

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

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

// Cambodian [km]
import dayjs from '../index';

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

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

// Kannada [kn]
import dayjs from '../index';

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

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

// Korean [ko]
import dayjs from '../index';

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

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

// Kurdish [ku]
import dayjs from '../index';

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

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

// Kyrgyz [ky]
import dayjs from '../index';

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

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

// Luxembourgish [lb]
import dayjs from '../index';

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

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

// Lao [lo]
import dayjs from '../index';

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

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

// Lithuanian [lt]
import dayjs from '../index';

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

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

// Latvian [lv]
import dayjs from '../index';

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

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

// Montenegrin [me]
import dayjs from '../index';

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

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

// Maori [mi]
import dayjs from '../index';

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

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

// Macedonian [mk]
import dayjs from '../index';

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

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

// Malayalam [ml]
import dayjs from '../index';

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

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

// Mongolian [mn]
import dayjs from '../index';

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

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

// Marathi [mr]
import dayjs from '../index';

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

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

// Malay [ms-my]
import dayjs from '../index';

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

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

// Malay [ms]
import dayjs from '../index';

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

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

// Maltese (Malta) [mt]
import dayjs from '../index';

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

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

// Burmese [my]
import dayjs from '../index';

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

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

// Norwegian Bokmål [nb]
import dayjs from '../index';

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

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

// Nepalese [ne]
import dayjs from '../index';

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

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

// Dutch (Belgium) [nl-be]
import dayjs from '../index';

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

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

// Dutch [nl]
import dayjs from '../index';

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

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

// Nynorsk [nn]
import dayjs from '../index';

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

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

// Occitan, lengadocian dialecte [oc-lnc]
import dayjs from '../index';

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

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

// Punjabi (India) [pa-in]
import dayjs from '../index';

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

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

// Polish [pl]
import dayjs from '../index';
function plural(n) {
return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; // eslint-disable-line
}
/* eslint-disable */
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
}
/* eslint-enable */
var locale = {

@@ -15,14 +49,14 @@ name: 'pl',

future: 'za %s',
past: 'po %s',
past: '%s temu',
s: 'kilka sekund',
m: 'minuta',
mm: '%d minut',
h: 'godzina',
hh: '%d godzin',
d: 'dzień',
m: translate,
mm: translate,
h: translate,
hh: translate,
d: '1 dzień',
dd: '%d dni',
M: 'miesiąc',
MM: '%d miesięcy',
MM: translate,
y: 'rok',
yy: '%d lat'
yy: translate
},

@@ -29,0 +63,0 @@ formats: {

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

// Portuguese (Brazil) [pt-br]
import dayjs from '../index';

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

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

// Portuguese [pt]
import dayjs from '../index';

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

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

// Romanian [ro]
import dayjs from '../index';

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

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

// Russian [ru]
import dayjs from '../index';

@@ -2,0 +3,0 @@ var monthFormat = 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_');

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

// Sindhi [sd]
import dayjs from '../index';

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

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

// Northern Sami [se]
import dayjs from '../index';

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

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

// Sinhalese [si]
import dayjs from '../index';

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

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

// Slovak [sk]
import dayjs from '../index';

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

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

// Slovenian [sl]
import dayjs from '../index';

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

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

// Albanian [sq]
import dayjs from '../index';

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

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

// Serbian Cyrillic [sr-cyrl]
import dayjs from '../index';

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

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

// Serbian [sr]
import dayjs from '../index';

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

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

// siSwati [ss]
import dayjs from '../index';

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

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

// Swedish [sv]
import dayjs from '../index';

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

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

// Swahili [sw]
import dayjs from '../index';

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

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

// Tamil [ta]
import dayjs from '../index';

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

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

// Telugu [te]
import dayjs from '../index';

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

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

// Tetun Dili (East Timor) [tet]
import dayjs from '../index';

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

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

// Tajik [tg]
import dayjs from '../index';

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

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

// Thai [th]
import dayjs from '../index';

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

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

// Tagalog (Philippines) [tl-ph]
import dayjs from '../index';

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

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

// Klingon [tlh]
import dayjs from '../index';

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

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

// Turkish [tr]
import dayjs from '../index';

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

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

// Talossan [tzl]
import dayjs from '../index';

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

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

// Central Atlas Tamazight Latin [tzm-latn]
import dayjs from '../index';

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

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

// Central Atlas Tamazight [tzm]
import dayjs from '../index';

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

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

// Uyghur (China) [ug-cn]
import dayjs from '../index';

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

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

// Ukrainian [uk]
import dayjs from '../index';

@@ -2,0 +3,0 @@

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

// Urdu [ur]
import dayjs from '../index';

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

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

// Uzbek Latin [uz-latn]
import dayjs from '../index';

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

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

// Uzbek [uz]
import dayjs from '../index';

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

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

// Vietnamese [vi]
import dayjs from '../index';

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

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

// Pseudo [x-pseudo]
import dayjs from '../index';

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

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

// Yoruba Nigeria [yo]
import dayjs from '../index';

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

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

// Chinese (China) [zh-cn]
import dayjs from '../index';

@@ -19,2 +20,3 @@ var locale = {

weekStart: 1,
yearStart: 4,
formats: {

@@ -21,0 +23,0 @@ LT: 'HH:mm',

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

// Chinese (Hong Kong) [zh-hk]
import dayjs from '../index';

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

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

// Chinese (Taiwan) [zh-tw]
import dayjs from '../index';

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

@@ -6,3 +6,3 @@ export default (function (o, c, dayjs) {

var getShort = function getShort(ins, target, full, num) {
var locale = ins.$locale();
var locale = ins.name ? ins : ins.$locale();

@@ -18,2 +18,6 @@ if (!locale[target]) {

var getDayjsLocaleObject = function getDayjsLocaleObject() {
return dayjs.Ls[dayjs.locale()];
};
var localeData = function localeData() {

@@ -49,9 +53,44 @@ var _this = this;

dayjs.localeData = function () {
var localeObject = dayjs.Ls[dayjs.locale()];
var localeObject = getDayjsLocaleObject();
return {
firstDayOfWeek: function firstDayOfWeek() {
return localeObject.weekStart || 0;
},
weekdays: function weekdays() {
return dayjs.weekdays();
},
weekdaysShort: function weekdaysShort() {
return dayjs.weekdaysShort();
},
weekdaysMin: function weekdaysMin() {
return dayjs.weekdaysMin();
},
months: function months() {
return dayjs.months();
},
monthsShort: function monthsShort() {
return dayjs.monthsShort();
}
};
};
dayjs.months = function () {
return getDayjsLocaleObject().months;
};
dayjs.monthsShort = function () {
return getShort(getDayjsLocaleObject(), 'monthsShort', 'months', 3);
};
dayjs.weekdays = function () {
return getDayjsLocaleObject().weekdays;
};
dayjs.weekdaysShort = function () {
return getShort(getDayjsLocaleObject(), 'weekdaysShort', 'weekdays', 3);
};
dayjs.weekdaysMin = function () {
return getShort(getDayjsLocaleObject(), 'weekdaysMin', 'weekdays', 2);
};
});
import { MS, Y, D, W } from '../../constant';
export default (function (o, c, d) {
export default (function (o, c) {
var proto = c.prototype;

@@ -11,11 +11,25 @@

if (week !== null) {
return this.add((week - this.week()) * 7, 'day');
return this.add((week - this.week()) * 7, D);
}
var weekStart = this.$locale().weekStart || 0;
var startOfYear = d(this).startOf(Y);
var compareDay = startOfYear.subtract(startOfYear.day() - weekStart, D).subtract(1, MS);
var diffInWeek = this.diff(compareDay, W, true);
var result = Math.ceil(diffInWeek);
return result > 52 ? 1 : result;
var yearStart = this.$locale().yearStart || 1;
if (this.month() === 11 && this.date() > 25) {
var nextYearStartDay = this.startOf(Y).add(1, Y).date(yearStart);
var thisEndOfWeek = this.endOf(W);
if (nextYearStartDay.isBefore(thisEndOfWeek)) {
return 1;
}
}
var yearStartDay = this.startOf(Y).date(yearStart);
var yearStartWeek = yearStartDay.startOf(W).subtract(1, MS);
var diffInWeek = this.diff(yearStartWeek, W, true);
if (diffInWeek < 0) {
return this.startOf('week').week();
}
return Math.ceil(diffInWeek);
};

@@ -22,0 +36,0 @@

@@ -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_en_gb=a(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var a={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},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"},ordinal:function(e){var a=["th","st","nd","rd"],_=e%100;return"["+e+(a[(_-20)%10]||a[_]||a[0])+"]"}};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_en_gb=a(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var a={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},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"},ordinal:function(e){var a=["th","st","nd","rd"],_=e%100;return"["+e+(a[(_-20)%10]||a[_]||a[0])+"]"}};return e.locale(a,null,!0),a});

@@ -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_et=t(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={name:"et",weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:"mõni sekund",m:"minut",mm:"%d minutit",h:"tund",hh:"%d tundi",d:"päev",dd:"%d päeva",M:"kuu",MM:"%d kuud",y:"aasta",yy:"%d aastat"},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"}};return e.locale(t,null,!0),t});
!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_et=a(e.dayjs)}(this,function(e){"use strict";function a(e,a,t,u){var s={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:["%d minuti","%d minutit"],h:["ühe tunni","tund aega","üks tund"],hh:["%d tunni","%d tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:["%d kuu","%d kuud"],y:["ühe aasta","aasta","üks aasta"],yy:["%d aasta","%d aastat"]};return a?(s[t][2]?s[t][2]:s[t][1]).replace("%d",e):(u?s[t][0]:s[t][1]).replace("%d",e)}e=e&&e.hasOwnProperty("default")?e.default:e;var t={name:"et",weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:"%d päeva",M:a,MM:a,y:a,yy:a},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"}};return e.locale(t,null,!0),t});

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

!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";e=e&&e.hasOwnProperty("default")?e.default:e;var i={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:"po %s",s:"kilka sekund",m:"minuta",mm:"%d minut",h:"godzina",hh:"%d godzin",d:"dzień",dd:"%d dni",M:"miesiąc",MM:"%d miesięcy",y:"rok",yy:"%d lat"},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(i,null,!0),i});
!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});

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

!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):_.dayjs_locale_zh_cn=e(_.dayjs)}(this,function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_;var e={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){switch(e){case"W":return _+"周";default:return _+"日"}},weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(_,e){var t=100*_+e;return t<600?"凌晨":t<900?"早上":t<1130?"上午":t<1230?"中午":t<1800?"下午":"晚上"}};return _.locale(e,null,!0),e});
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):_.dayjs_locale_zh_cn=e(_.dayjs)}(this,function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_;var e={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){switch(e){case"W":return _+"周";default:return _+"日"}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(_,e){var t=100*_+e;return t<600?"凌晨":t<900?"早上":t<1130?"上午":t<1230?"中午":t<1800?"下午":"晚上"}};return _.locale(e,null,!0),e});
{
"name": "dayjs",
"version": "1.8.19",
"version": "1.8.20",
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",

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

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.dayjs_plugin_localeData=n()}(this,function(){"use strict";return function(t,n,e){var o=function(t,n,e,o){var r=t.$locale();return r[n]?r[n]:r[e].map(function(t){return t.substr(0,o)})};n.prototype.localeData=function(){return function(){var t=this;return{months:function(n){return n?n.format("MMMM"):o(t,"months")},monthsShort:function(n){return n?n.format("MMM"):o(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdaysMin:function(n){return n?n.format("dd"):o(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(n){return n?n.format("ddd"):o(t,"weekdaysShort","weekdays",3)},longDateFormat:function(n){return t.$locale().formats[n]}}}.bind(this)()},e.localeData=function(){var t=e.Ls[e.locale()];return{firstDayOfWeek:function(){return t.weekStart||0}}}}});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.dayjs_plugin_localeData=t()}(this,function(){"use strict";return function(n,t,e){var r=function(n,t,e,r){var o=n.name?n:n.$locale();return o[t]?o[t]:o[e].map(function(n){return n.substr(0,r)})},o=function(){return e.Ls[e.locale()]};t.prototype.localeData=function(){return function(){var n=this;return{months:function(t){return t?t.format("MMMM"):r(n,"months")},monthsShort:function(t){return t?t.format("MMM"):r(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdaysMin:function(t){return t?t.format("dd"):r(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):r(n,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return n.$locale().formats[t]}}}.bind(this)()},e.localeData=function(){var n=o();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return e.weekdays()},weekdaysShort:function(){return e.weekdaysShort()},weekdaysMin:function(){return e.weekdaysMin()},months:function(){return e.months()},monthsShort:function(){return e.monthsShort()}}},e.months=function(){return o().months},e.monthsShort=function(){return r(o(),"monthsShort","months",3)},e.weekdays=function(){return o().weekdays},e.weekdaysShort=function(){return r(o(),"weekdaysShort","weekdays",3)},e.weekdaysMin=function(){return r(o(),"weekdaysMin","weekdays",2)}}});

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.dayjs_plugin_weekOfYear=t()}(this,function(){"use strict";return function(e,t,i){var n=t.prototype;n.week=function(e){if(void 0===e&&(e=null),null!==e)return this.add(7*(e-this.week()),"day");var t=this.$locale().weekStart||0,n=i(this).startOf("year"),o=n.subtract(n.day()-t,"day").subtract(1,"millisecond"),r=this.diff(o,"week",!0),u=Math.ceil(r);return u>52?1:u},n.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.dayjs_plugin_weekOfYear=t()}(this,function(){"use strict";var e="week",t="year";return function(i,n){var r=n.prototype;r.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var r=this.startOf(t).add(1,t).date(n),f=this.endOf(e);if(r.isBefore(f))return 1}var s=this.startOf(t).date(n).startOf(e).subtract(1,"millisecond"),a=this.diff(s,e,!0);return a<0?this.startOf("week").week():Math.ceil(a)},r.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}});
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc