Skip to content

Commit

Permalink
Merge pull request #1855 from iamkun/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
iamkun committed Apr 15, 2022
2 parents 4e3b4bf + a597d0b commit 5322037
Show file tree
Hide file tree
Showing 13 changed files with 514 additions and 43 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md)
English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md) | [Türkçe](./docs/tr/README-tr.md)

<p align="center"><a href="https://day.js.org/" target="_blank" rel="noopener noreferrer"><img width="550"
src="https://user-images.githubusercontent.com/17680888/39081119-3057bbe2-456e-11e8-862c-646133ad4b43.png"
Expand Down Expand Up @@ -100,12 +100,21 @@ dayjs().format('Q Do k kk X x') // more available formats

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/dayjs#sponsor)]

<a href="https://opencollective.com/dayjs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/3/avatar.svg"></a>
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

[[Become a sponsor via Github](https://github.com/sponsors/iamkun/)] [[Become a sponsor via OpenCollective](https://opencollective.com/dayjs#sponsor)]

<a href="https://www.exoflare.com/open-source/?utm_source=dayjs&utm_campaign=open_source" target="_blank">
<img width="70" src="https://user-images.githubusercontent.com/17680888/162761622-1407a849-0c41-4591-8aa9-f98114ec2092.png">
</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/vendure-ecommerce" target="_blank"><img width="70" src="https://github.com/avatars/u/39629390?s=52&v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/Velc" target="_blank"><img width="70" src="https://github.com/avatars/u/1551649?s=52&v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/projectdiscovery" target="_blank"><img width="70" src="https://github.com/avatars/u/50994705?s=52&v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://opencollective.com/datawrapper" target="_blank"><img width="70" src="https://images.opencollective.com/datawrapper/c13e229/logo.png"></a>

## Contributors

Expand Down
136 changes: 136 additions & 0 deletions docs/tr/README-tr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
Türkçe | [English](../../README.md) | [简体中文](../zh-cn/README.zh-CN.md) | [日本語](../ja/README-ja.md) | [Português Brasileiro](../pt-br/README-pt-br.md) | [한국어](../ko/README-ko.md) | [Español (España)](../es-es/README-es-es.md) | [Русский](../ru/README-ru.md)

<p align="center"><a href="https://day.js.org/" target="_blank" rel="noopener noreferrer"><img width="550"
src="https://user-images.githubusercontent.com/17680888/39081119-3057bbe2-456e-11e8-862c-646133ad4b43.png"
alt="Day.js"></a></p>
<p align="center">Aynı modern API ile <b>2kB</b> hızlı bir Moment.js alternatifi</p>
<br>
<p align="center">
<a href="https://unpkg.com/dayjs/dayjs.min.js"><img
src="https://img.badgesize.io/https://unpkg.com/dayjs/dayjs.min.js?compression=gzip&style=flat-square"
alt="Gzip Size"></a>
<a href="https://www.npmjs.com/package/dayjs"><img src="https://img.shields.io/npm/v/dayjs.svg?style=flat-square&colorB=51C838"
alt="NPM Version"></a>
<a href="https://travis-ci.org/iamkun/dayjs"><img
src="https://img.shields.io/travis/iamkun/dayjs/master.svg?style=flat-square" alt="Build Status"></a>
<a href="https://codecov.io/gh/iamkun/dayjs"><img
src="https://img.shields.io/codecov/c/github/iamkun/dayjs/master.svg?style=flat-square" alt="Codecov"></a>
<a href="https://github.com/iamkun/dayjs/blob/master/LICENSE"><img
src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" alt="License"></a>
<br>
<a href="https://saucelabs.com/u/dayjs">
<img width="750" src="https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png" alt="Sauce Test Status">
</a>
</p>

> Day.js, büyük ölçüde Moment.js uyumlu bir API ile modern tarayıcılar için tarih ve saatleri dönüştüren, doğrulayan, işleyen ve görüntüleyen minimalist bir JavaScript kütüphanesidir. Moment.js kullanıyorsanız, Day.js'i nasıl kullanacağınızı zaten biliyorsunuzdur.
```js
dayjs()
.startOf('month')
.add(1, 'day')
.set('year', 2018)
.format('YYYY-MM-DD HH:mm:ss')
```

- 🕒 Benzer Moment.js API & Kalıpları
- 💪 Değişmez
- 🔥 Zincirlenebilir
- 🌐 I18n destekler
- 📦 2kB boyutunda küçük bir kütaphane
- 👫 Bütün tarayıcılarda desteklenir

---

# Başlarken

### Dökümantasyon

Daha fazla bilgiye, API ve diğer dökümanlara [day.js.org](https://day.js.org/) websitesinden ulaşabilirsiniz.

## Kurulum

```console
npm install dayjs --save
```

📚[Kurulum Rehberi](https://day.js.org/docs/en/installation/installation)

## API

Tarihleri ve saatleri dönüştürmek, doğrulamak, işlemek ve görüntülemek için Day.js API'larını kullanmak kolaydır.

```javascript
dayjs('2018-08-08') // dönüştürme

dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // belirli bir formatta görüntüleme

dayjs()
.set('month', 3)
.month() // görüntüleme & değer atama

dayjs().add(1, 'year') // değiştirme

dayjs().isBefore(dayjs()) // sorgulama
```

📚[API Referansı](https://day.js.org/docs/en/parse/parse)

## I18n

Day.js, uluslararasılaştırma için büyük desteğe sahiptir.

Ancak siz kullanmadığınız sürece bunların hiçbiri yapınıza dahil edilmeyecektir.

```javascript
import 'dayjs/locale/es' // isteğe göre yükle

dayjs.locale('tr') // yerel ayarı Türkçe olarak kullan

dayjs('2018-05-05')
.locale('zh-cn')
.format() //belirli bir durum için Basitleştirilmiş Çince formatında görüntüleme
```

📚[Uluslararasılaştırma](https://day.js.org/docs/en/i18n/i18n)

## Eklenti

Eklenti, işlevselliği genişletmek veya yeni özellikler eklemek için Day.js'e eklenebilen bağımsız bir modüldür.

```javascript
import advancedFormat from 'dayjs/plugin/advancedFormat' // isteğe göre yükle

dayjs.extend(advancedFormat) // eklentiyi kullan

dayjs().format('Q Do k kk X x') // diğer mevcut formatlar
```

📚[Eklenti Listesi](https://day.js.org/docs/en/plugin/plugin)

## Sponsorlar

Sponsor olarak bu projeye destek olun. Logonuz, web sayfanızın linki ile birlikte burada görünür. [[Sponsor Ol](https://opencollective.com/dayjs#sponsor)]

<a href="https://opencollective.com/dayjs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/dayjs/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dayjs/sponsor/3/avatar.svg"></a>

## Katkıda Bulunanlar

Bu proje, katkıda bulunan tüm insanlar sayesinde mevcut.

Lütfen bize destek olmak için projeye 💖 yıldız 💖 verin. Teşekkürler.

Ve tüm destekçilerimize teşekkür ederiz! 🙏

<a href="https://opencollective.com/dayjs/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/1/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/2/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs/backer/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/dayjs/backer/3/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/dayjs#backers" target="_blank"><img src="https://opencollective.com/dayjs/contributors.svg?width=890" /></a>

## Lisans

Day.js, bir [MIT Lisansı](../../LICENSE) altında lisanslanmıştır.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Dayjs {
weekdays, months, meridiem
} = locale
const getShort = (arr, index, full, length) => (
(arr && (arr[index] || arr(this, str))) || full[index].substr(0, length)
(arr && (arr[index] || arr(this, str))) || full[index].slice(0, length)
)
const get$H = num => (
Utils.s($H % 12 || 12, num, '0')
Expand Down
91 changes: 91 additions & 0 deletions src/locale/bn-bd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Bengali (Bangladesh) [bn-bd]
import dayjs from 'dayjs'

const symbolMap = {
1: '১',
2: '২',
3: '৩',
4: '৪',
5: '৫',
6: '৬',
7: '৭',
8: '৮',
9: '৯',
0: '০'
}

const numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'৪': '4',
'৫': '5',
'৬': '6',
'৭': '7',
'৮': '8',
'৯': '9',
'০': '0'
}

const locale = {
name: 'bn-bd',
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
weekStart: 0,
preparse(string) {
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, match => numberMap[match])
},
postformat(string) {
return string.replace(/\d/g, match => symbolMap[match])
},
ordinal: (n) => {
const s = ['ই', 'লা', 'রা', 'ঠা', 'শে']
const v = n % 100
return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`
},
formats: {
LT: 'A h:mm সময়',
LTS: 'A h:mm:ss সময়',
L: 'DD/MM/YYYY খ্রিস্টাব্দ',
LL: 'D MMMM YYYY খ্রিস্টাব্দ',
LLL: 'D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়',
LLLL: 'dddd, D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়'
},
meridiem: hour =>
/* eslint-disable no-nested-ternary */
(hour < 4
? 'রাত'
: hour < 6
? 'ভোর'
: hour < 12
? 'সকাল'
: hour < 15
? 'দুপুর'
: hour < 18
? 'বিকাল'
: hour < 20
? 'সন্ধ্যা'
: 'রাত'),
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
28 changes: 14 additions & 14 deletions src/locale/bo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import dayjs from 'dayjs'
const locale = {
name: 'bo',
weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
monthsShort: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
weekdaysMin: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
monthsShort: 'ཟླ་དང་པོ_ཟླ་གཉིས་པ_ཟླ་གསུམ་པ_ཟླ་བཞི་པ_ཟླ་ལྔ་པ_ཟླ་དྲུག་པ_ཟླ་བདུན་པ_ཟླ་བརྒྱད་པ_ཟླ་དགུ་པ_ཟླ་བཅུ་པ_ཟླ་བཅུ་གཅིག་པ_ཟླ་བཅུ་གཉིས་པ'.split('_'),
ordinal: n => n,
formats: {
LT: 'A h:mm',
Expand All @@ -19,18 +19,18 @@ const locale = {
},
relativeTime: {
future: '%s ལ་',
past: '%s སྔན་ལ',
s: 'ལམ་སང',
m: 'སྐར་མ་གཅིག',
mm: '%d སྐར་མ',
h: 'ཆུ་ཚོད་གཅིག',
hh: '%d ཆུ་ཚོད',
d: 'ཉིན་གཅིག',
dd: '%d ཉིན་',
M: 'ཟླ་བ་གཅིག',
MM: '%d ཟླ་བ',
y: 'ལོ་གཅིག',
yy: '%d ལོ'
past: '%s སྔོན་ལ་',
s: 'ཏོག་ཙམ་',
m: 'སྐར་མ་གཅིག',
mm: 'སྐར་མ་ %d',
h: 'ཆུ་ཚོད་གཅིག',
hh: 'ཆུ་ཚོད་ %d',
d: 'ཉིན་གཅིག',
dd: 'ཉིན་ %d',
M: 'ཟླ་བ་གཅིག',
MM: 'ཟླ་བ་ %d',
y: 'ལོ་གཅིག',
yy: 'ལོ་ %d'
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/locale/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const locale = {
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),
ordinal: n => `${n}.`,
weekStart: 1,
yearStart: 4,
Expand Down
15 changes: 15 additions & 0 deletions src/locale/it-ch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ const locale = {
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm'
},
relativeTime: {
future: 'tra %s',
past: '%s fa',
s: 'alcuni secondi',
m: 'un minuto',
mm: '%d minuti',
h: 'un\'ora',
hh: '%d ore',
d: 'un giorno',
dd: '%d giorni',
M: 'un mese',
MM: '%d mesi',
y: 'un anno',
yy: '%d anni'
}
}

Expand Down
Loading

0 comments on commit 5322037

Please sign in to comment.