Skip to content

Commit

Permalink
Merge branch 'master' into combined
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed Nov 17, 2018
2 parents 63bafc7 + 2485cc1 commit 50fe23f
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/en/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ Returns a `number` indicating the difference of two `Dayjs`s in the specified un
const date1 = dayjs('2019-01-25');
const date2 = dayjs('2018-06-05');
date1.diff(date2); // 20214000000
date1.diff(date2, 'months'); // 7
date1.diff(date2, 'months', true); // 7.645161290322581
date1.diff(date2, 'days'); // 233
date1.diff(date2, 'month'); // 7
date1.diff(date2, 'month', true); // 7.645161290322581
date1.diff(date2, 'day'); // 233
```

### Unix Timestamp (milliseconds) `.valueOf()`
Expand Down
28 changes: 28 additions & 0 deletions src/locale/el.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import dayjs from 'dayjs'

const locale = {
name: 'el',
weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
months: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ'.split('_'),
ordinal: n => n,
relativeTime: {
future: 'σε %s',
past: 'πριν %s',
s: 'μερικά δευτερόλεπτα',
m: 'ένα λεπτό',
mm: '%d λεπτά',
h: 'μία ώρα',
hh: '%d ώρες',
d: 'μία μέρα',
dd: '%d μέρες',
M: 'ένα μήνα',
MM: '%d μήνες',
y: 'ένα χρόνο',
yy: '%d χρόνια'
}
}

dayjs.locale(locale, null, true)

export default locale
29 changes: 29 additions & 0 deletions src/locale/he.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import dayjs from 'dayjs'

const locale = {
name: 'he',
weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
weekdaysMin: 'א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳'.split('_'),
months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
monthsShort: 'ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ'.split('_'),
relativeTime: {
future: 'בעוד %s',
past: 'לפני %s',
s: 'כמה שניות',
m: 'דקה',
mm: '%d דקות',
h: 'שעה',
hh: '%d שעות',
d: 'יום',
dd: '%d ימים',
M: 'חודש',
MM: '%d חודשים',
y: 'שנה',
yy: '%d שנים'
},
ordinal: n => n
}

dayjs.locale(locale, null, true)

export default locale
27 changes: 27 additions & 0 deletions src/locale/lt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import dayjs from 'dayjs'

const locale = {
name: 'lt',
weekdays: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
months: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
ordinal: n => `${n}.`,
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'
}
}

dayjs.locale(locale, null, true)

export default locale
2 changes: 1 addition & 1 deletion src/locale/nb.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const locale = {
future: 'om %s',
past: 'for %s siden',
s: 'noen sekunder',
m: 'ett minuttt',
m: 'ett minutt',
mm: '%d minutter',
h: 'en time',
hh: '%d timer',
Expand Down
24 changes: 13 additions & 11 deletions src/locale/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ import dayjs from 'dayjs-ext'
const locale = {
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('_'),
ordinal: n => `${n}.`,
relativeTime: {
future: 'za %s',
past: 'po %s',
s: 'kilka Sekund',
m: 'Minuta',
mm: '%d Minut',
h: 'Godzina',
hh: '%d Godzin',
d: 'Tydzień',
dd: '%d Tygodni',
M: 'Miesiąc',
MM: '%d Miesięcy',
y: 'Rok',
yy: '%d Lat'
s: 'kilka sekund',
m: 'minuta',
mm: '%d minut',
h: 'godzina',
hh: '%d godzin',
d: 'tydzień',
dd: '%d tygodni',
M: 'miesiąc',
MM: '%d miesięcy',
y: 'rok',
yy: '%d lat'
}
}

Expand Down

0 comments on commit 50fe23f

Please sign in to comment.