Comparing version 1.8.22 to 1.8.23
@@ -0,1 +1,12 @@ | ||
## [1.8.23](https://github.com/iamkun/dayjs/compare/v1.8.22...v1.8.23) (2020-03-16) | ||
### Bug Fixes | ||
* Add Chinese (zh) locale ([f9b8945](https://github.com/iamkun/dayjs/commit/f9b89453166d8b53d33b1d7eefd9942022552e6e)) | ||
* Fix IsoWeek plugin typescript definition ([#828](https://github.com/iamkun/dayjs/issues/828)) ([30aab0c](https://github.com/iamkun/dayjs/commit/30aab0c7bce85dfac0ae208a891def30f88b5cb4)) | ||
* Update Arabic (ar) locale relative time ([#836](https://github.com/iamkun/dayjs/issues/836)) ([14044c6](https://github.com/iamkun/dayjs/commit/14044c6fda1229e3f0e5473d3f886bd79589b15f)) | ||
* Update Slovak (sk) locale, Czech (cs) locale ([#833](https://github.com/iamkun/dayjs/issues/833)) ([f0d451f](https://github.com/iamkun/dayjs/commit/f0d451f795e9ebf752cd854d51b25b11de2343a3)) | ||
* Update Thai (th) locale relativeTime ([#826](https://github.com/iamkun/dayjs/issues/826)) ([63b7c03](https://github.com/iamkun/dayjs/commit/63b7c03a6dbb0507d60776e8bad6cccde3828b88)), closes [#816](https://github.com/iamkun/dayjs/issues/816) | ||
## [1.8.22](https://github.com/iamkun/dayjs/compare/v1.8.21...v1.8.22) (2020-03-08) | ||
@@ -2,0 +13,0 @@ |
@@ -17,11 +17,11 @@ // Arabic [ar] | ||
m: 'دقيقة واحدة', | ||
mm: 'دقائق %d', | ||
mm: '%d دقائق', | ||
h: 'ساعة واحدة', | ||
hh: 'ساعات %d', | ||
hh: '%d ساعات', | ||
d: 'يوم واحد', | ||
dd: 'أيام %d', | ||
dd: '%d أيام', | ||
M: 'شهر واحد', | ||
MM: 'شهرا %d', | ||
MM: '%d أشهر', | ||
y: 'عام واحد', | ||
yy: 'أعوام %d' | ||
yy: '%d أعوام' | ||
}, | ||
@@ -28,0 +28,0 @@ ordinal: function ordinal(n) { |
@@ -90,2 +90,3 @@ // Czech [cs] | ||
weekStart: 1, | ||
yearStart: 4, | ||
ordinal: function ordinal(n) { | ||
@@ -92,0 +93,0 @@ return n + "."; |
// Slovak [sk] | ||
import dayjs from '../index'; | ||
function plural(n) { | ||
return n > 1 && n < 5 && ~~(n / 10) !== 1; // eslint-disable-line | ||
} | ||
/* eslint-disable */ | ||
function translate(number, withoutSuffix, key, isFuture) { | ||
var result = number + " "; | ||
switch (key) { | ||
case 's': | ||
// a few seconds / in a few seconds / a few seconds ago | ||
return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; | ||
case 'm': | ||
// a minute / in a minute / a minute ago | ||
return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; | ||
case 'mm': | ||
// 9 minutes / in 9 minutes / 9 minutes ago | ||
if (withoutSuffix || isFuture) { | ||
return result + (plural(number) ? 'minúty' : 'minút'); | ||
} | ||
return result + "min\xFAtami"; | ||
case 'h': | ||
// an hour / in an hour / an hour ago | ||
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; | ||
case 'hh': | ||
// 9 hours / in 9 hours / 9 hours ago | ||
if (withoutSuffix || isFuture) { | ||
return result + (plural(number) ? 'hodiny' : 'hodín'); | ||
} | ||
return result + "hodinami"; | ||
case 'd': | ||
// a day / in a day / a day ago | ||
return withoutSuffix || isFuture ? 'deň' : 'dňom'; | ||
case 'dd': | ||
// 9 days / in 9 days / 9 days ago | ||
if (withoutSuffix || isFuture) { | ||
return result + (plural(number) ? 'dni' : 'dní'); | ||
} | ||
return result + "d\u0148ami"; | ||
case 'M': | ||
// a month / in a month / a month ago | ||
return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; | ||
case 'MM': | ||
// 9 months / in 9 months / 9 months ago | ||
if (withoutSuffix || isFuture) { | ||
return result + (plural(number) ? 'mesiace' : 'mesiacov'); | ||
} | ||
return result + "mesiacmi"; | ||
case 'y': | ||
// a year / in a year / a year ago | ||
return withoutSuffix || isFuture ? 'rok' : 'rokom'; | ||
case 'yy': | ||
// 9 years / in 9 years / 9 years ago | ||
if (withoutSuffix || isFuture) { | ||
return result + (plural(number) ? 'roky' : 'rokov'); | ||
} | ||
return result + "rokmi"; | ||
} | ||
} | ||
/* eslint-enable */ | ||
var locale = { | ||
name: 'sk', | ||
weekdays: 'Nedeľa_Pondelok_Utorok_Streda_Štvrtok_Piatok_Sobota'.split('_'), | ||
weekdaysShort: 'Ne_Po_Ut_St_Št_Pi_So'.split('_'), | ||
weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), | ||
weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), | ||
weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), | ||
@@ -11,19 +90,5 @@ months: 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), | ||
weekStart: 1, | ||
relativeTime: { | ||
future: 'o %s', | ||
past: 'pred %s', | ||
s: 'niekoľko sekúnd', | ||
m: 'minúta', | ||
mm: '%d minút', | ||
h: 'hodina', | ||
hh: '%d hodín', | ||
d: 'deň', | ||
dd: '%d dní', | ||
M: 'mesiac', | ||
MM: '%d mesiacov', | ||
y: 'rok', | ||
yy: '%d rokov' | ||
}, | ||
yearStart: 4, | ||
ordinal: function ordinal(n) { | ||
return n + "\xBA"; | ||
return n + "."; | ||
}, | ||
@@ -36,3 +101,20 @@ formats: { | ||
LLL: 'D. MMMM YYYY H:mm', | ||
LLLL: 'dddd D. MMMM YYYY H:mm' | ||
LLLL: 'dddd D. MMMM YYYY H:mm', | ||
l: 'D. M. YYYY' | ||
}, | ||
relativeTime: { | ||
future: 'za %s', | ||
// Should be `o %s` (change when moment/moment#5408 is fixed) | ||
past: 'pred %s', | ||
s: translate, | ||
m: translate, | ||
mm: translate, | ||
h: translate, | ||
hh: translate, | ||
d: translate, | ||
dd: translate, | ||
M: translate, | ||
MM: translate, | ||
y: translate, | ||
yy: translate | ||
} | ||
@@ -39,0 +121,0 @@ }; |
@@ -20,13 +20,13 @@ // Thai [th] | ||
future: 'อีก %s', | ||
past: '%s ที่ผ่านมา', | ||
s: 'ไม่กี่วิ', | ||
m: 'นาที', | ||
past: '%sที่แล้ว', | ||
s: 'ไม่กี่วินาที', | ||
m: '1 นาที', | ||
mm: '%d นาที', | ||
h: 'ชั่วโมง', | ||
h: '1 ชั่วโมง', | ||
hh: '%d ชั่วโมง', | ||
d: 'วัน', | ||
d: '1 วัน', | ||
dd: '%d วัน', | ||
M: 'เดือน', | ||
M: '1 เดือน', | ||
MM: '%d เดือน', | ||
y: 'ปี', | ||
y: '1 ปี', | ||
yy: '%d ปี' | ||
@@ -33,0 +33,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):e.dayjs_locale_ar=_(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var _="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),t={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:_,monthsShort:_,weekStart:6,relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"دقائق %d",h:"ساعة واحدة",hh:"ساعات %d",d:"يوم واحد",dd:"أيام %d",M:"شهر واحد",MM:"شهرا %d",y:"عام واحد",yy:"أعوام %d"},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return e.locale(t,null,!0),t}); | ||
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):e.dayjs_locale_ar=_(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var _="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),t={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:_,monthsShort:_,weekStart:6,relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return e.locale(t,null,!0),t}); |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):e.dayjs_locale_cs=n(e.dayjs)}(this,function(e){"use strict";function n(e){return e>1&&e<5&&1!=~~(e/10)}function t(e,t,s,r){var d=e+" ";switch(s){case"s":return t||r?"pár sekund":"pár sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?d+(n(e)?"minuty":"minut"):d+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?d+(n(e)?"hodiny":"hodin"):d+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?d+(n(e)?"dny":"dní"):d+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?d+(n(e)?"měsíce":"měsíců"):d+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?d+(n(e)?"roky":"let"):d+"lety"}}e=e&&e.hasOwnProperty("default")?e.default:e;var s={name:"cs",weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),months:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort:"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),weekStart:1,ordinal:function(e){return e+"."},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",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"před %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t}};return e.locale(s,null,!0),s}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):e.dayjs_locale_cs=n(e.dayjs)}(this,function(e){"use strict";function n(e){return e>1&&e<5&&1!=~~(e/10)}function t(e,t,r,s){var d=e+" ";switch(r){case"s":return t||s?"pár sekund":"pár sekundami";case"m":return t?"minuta":s?"minutu":"minutou";case"mm":return t||s?d+(n(e)?"minuty":"minut"):d+"minutami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?d+(n(e)?"hodiny":"hodin"):d+"hodinami";case"d":return t||s?"den":"dnem";case"dd":return t||s?d+(n(e)?"dny":"dní"):d+"dny";case"M":return t||s?"měsíc":"měsícem";case"MM":return t||s?d+(n(e)?"měsíce":"měsíců"):d+"měsíci";case"y":return t||s?"rok":"rokem";case"yy":return t||s?d+(n(e)?"roky":"let"):d+"lety"}}e=e&&e.hasOwnProperty("default")?e.default:e;var r={name:"cs",weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),months:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort:"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},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",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"před %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t}};return e.locale(r,null,!0),r}); |
@@ -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_sk=t(e.dayjs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={name:"sk",weekdays:"Nedeľa_Pondelok_Utorok_Streda_Štvrtok_Piatok_Sobota".split("_"),weekdaysShort:"Ne_Po_Ut_St_Št_Pi_So".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),months:"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort:"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),weekStart:1,relativeTime:{future:"o %s",past:"pred %s",s:"niekoľko sekúnd",m:"minúta",mm:"%d minút",h:"hodina",hh:"%d hodín",d:"deň",dd:"%d dní",M:"mesiac",MM:"%d mesiacov",y:"rok",yy:"%d rokov"},ordinal:function(e){return e+"º"},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,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):e.dayjs_locale_sk=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e>1&&e<5&&1!=~~(e/10)}function r(e,r,n,a){var s=e+" ";switch(n){case"s":return r||a?"pár sekúnd":"pár sekundami";case"m":return r?"minúta":a?"minútu":"minútou";case"mm":return r||a?s+(t(e)?"minúty":"minút"):s+"minútami";case"h":return r?"hodina":a?"hodinu":"hodinou";case"hh":return r||a?s+(t(e)?"hodiny":"hodín"):s+"hodinami";case"d":return r||a?"deň":"dňom";case"dd":return r||a?s+(t(e)?"dni":"dní"):s+"dňami";case"M":return r||a?"mesiac":"mesiacom";case"MM":return r||a?s+(t(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return r||a?"rok":"rokom";case"yy":return r||a?s+(t(e)?"roky":"rokov"):s+"rokmi"}}e=e&&e.hasOwnProperty("default")?e.default:e;var n={name:"sk",weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),months:"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort:"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},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",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"pred %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r}};return e.locale(n,null,!0),n}); |
@@ -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_th=e(_.dayjs)}(this,function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_;var e={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),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:"อีก %s",past:"%s ที่ผ่านมา",s:"ไม่กี่วิ",m:"นาที",mm:"%d นาที",h:"ชั่วโมง",hh:"%d ชั่วโมง",d:"วัน",dd:"%d วัน",M:"เดือน",MM:"%d เดือน",y:"ปี",yy:"%d ปี"},ordinal:function(_){return _+"."}};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_th=e(_.dayjs)}(this,function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_;var e={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),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:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(_){return _+"."}};return _.locale(e,null,!0),e}); |
{ | ||
"name": "dayjs", | ||
"version": "1.8.22", | ||
"version": "1.8.23", | ||
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ", | ||
@@ -5,0 +5,0 @@ "main": "dayjs.min.js", |
@@ -1,2 +0,2 @@ | ||
import { PluginFunc, QUnitType, ConfigType } from 'dayjs' | ||
import { PluginFunc, UnitType, ConfigType } from 'dayjs' | ||
@@ -3,0 +3,0 @@ declare const plugin: PluginFunc |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
438743
349
7430
130