Skip to content

Commit

Permalink
fix: add isBetween API & update
Browse files Browse the repository at this point in the history
update german locale, add romanian locale
  • Loading branch information
iamkun committed Aug 10, 2018
1 parent 11428ff commit b5fc3d1
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/en/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The `Dayjs` object is immutable, that is, all API operations that change the `Da
- [RelativeTime](#relativetime)
- [IsLeapYear](#isleapyear)
- [WeekOfYear](#weekofyear)
- [IsBetween](#isbetween)

## Parsing

Expand Down Expand Up @@ -421,3 +422,9 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)
`.week` to get week of the year

plugin [`WeekOfYear`](./Plugin.md#weekofyear)

### IsBetween

`.isBetween` to check if a date is between two other dates

plugin [`IsBetween`](./Plugin.md#isbetween)
11 changes: 11 additions & 0 deletions docs/en/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ dayjs.extend(weekOfYear)
dayjs('06/27/2018').week() // 26
```

### IsBetween
- IsBetween adds `.isBetween()` API to returns a `boolean` indicating if a date is between two other dates.

```javascript
import isBetween from 'dayjs/plugin/isBetween'

dayjs.extend(isBetween)

dayjs('2010-10-20').isBetween('2010-10-19', dayjs('2010-10-25')); // true
```

## Customize

You could build your own Day.js plugin to meet different needs.
Expand Down
7 changes: 7 additions & 0 deletions docs/ja/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Day.js は組み込みの `Date.prototype` を変更する代わりに `Dayjs`
* [RelativeTime](#relativetime)
* [IsLeapYear](#isleapyear)
* [WeekOfYear](#weekofyear)
* [IsBetween](#isbetween)

---

Expand Down Expand Up @@ -492,3 +493,9 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)
`.week` to get week of the year

plugin [`WeekOfYear`](./Plugin.md#weekofyear)

### IsBetween

`.isBetween` to check if a date is between two other dates

plugin [`IsBetween`](./Plugin.md#isbetween)
11 changes: 11 additions & 0 deletions docs/ja/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ dayjs.extend(weekOfYear)
dayjs('06/27/2018').week() // 26
```

### IsBetween
- IsBetween adds `.isBetween()` API to returns a `boolean` indicating if a date is between two other dates.

```javascript
import isBetween from 'dayjs/plugin/isBetween'

dayjs.extend(isBetween)

dayjs('2010-10-20').isBetween('2010-10-19', dayjs('2010-10-25')); // true
```

## カスタマイズ

さまざまなニーズに合わせて独自の Day.js プラグインを構築することができます。
Expand Down
7 changes: 7 additions & 0 deletions docs/ko/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Day.js는 네이티브 `Date.prototype`을 수정하는 대신 `Dayjs` 오브젝
- [RelativeTime](#relativetime)
- [IsLeapYear](#isleapyear)
- [WeekOfYear](#weekofyear)
- [IsBetween](#isbetween)

## Parsing

Expand Down Expand Up @@ -421,3 +422,9 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)
`.week` to get week of the year

plugin [`WeekOfYear`](./Plugin.md#weekofyear)

### IsBetween

`.isBetween` to check if a date is between two other dates

plugin [`IsBetween`](./Plugin.md#isbetween)
11 changes: 11 additions & 0 deletions docs/ko/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ dayjs.extend(weekOfYear)
dayjs('06/27/2018').week() // 26
```

### IsBetween
- IsBetween adds `.isBetween()` API to returns a `boolean` indicating if a date is between two other dates.

```javascript
import isBetween from 'dayjs/plugin/isBetween'

dayjs.extend(isBetween)

dayjs('2010-10-20').isBetween('2010-10-19', dayjs('2010-10-25')); // true
```

## Customize

다양한 요구를 충족하기위해 자신만의 Day.js 플러그인을 만들 수 있습니다.
Expand Down
7 changes: 7 additions & 0 deletions docs/pt-br/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Este objeto `Dayjs` é imutável, ou seja, todas as operações desta API irão
* [RelativeTime](#relativetime)
* [IsLeapYear](#isleapyear)
* [WeekOfYear](#weekofyear)
* [IsBetween](#isbetween)

---
O Day.js sempre irá retornar um novo objeto `Dayjs` se nada for especificado.
Expand Down Expand Up @@ -470,3 +471,9 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)
`.week` to get week of the year

plugin [`WeekOfYear`](./Plugin.md#weekofyear)

### IsBetween

`.isBetween` to check if a date is between two other dates

plugin [`IsBetween`](./Plugin.md#isbetween)
11 changes: 11 additions & 0 deletions docs/pt-br/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ dayjs.extend(weekOfYear)
dayjs('06/27/2018').week() // 26
```

### IsBetween
- IsBetween adds `.isBetween()` API to returns a `boolean` indicating if a date is between two other dates.

```javascript
import isBetween from 'dayjs/plugin/isBetween'

dayjs.extend(isBetween)

dayjs('2010-10-20').isBetween('2010-10-19', dayjs('2010-10-25')); // true
```

## Customizar

Você também pode construir seu próprio plugin Day.js para diferentes necessidades. Sinta-se à vontade para abrir um pull request e compartilhar seu plugin com a comunidade.
Expand Down
9 changes: 8 additions & 1 deletion docs/zh-cn/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* [相对时间](#relativetime)
* [是否是闰年](#是否是闰年)
* [年中的第几周](#年中的第几周)
* [是否之间](#isbetween)

---
如果没有特别说明,Day.js 的返回值都是新的 `Dayjs` 对象。
Expand Down Expand Up @@ -370,4 +371,10 @@ dayjs.isDayjs(new Date()); // false

`.week` 获取是第几个周

插件 [`WeekOfYear`](./Plugin.md#weekofyear)
插件 [`WeekOfYear`](./Plugin.md#weekofyear)

### 是否之间

`.isBetween` 返回一个时间是否介于两个时间之间

plugin [`IsBetween`](./Plugin.md#isbetween)
11 changes: 11 additions & 0 deletions docs/zh-cn/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ dayjs.extend(weekOfYear)
dayjs('06/27/2018').week() // 26
```

### IsBetween
- IsBetween 增加了 `.isBetween()` API 返回一个 `boolean` 来展示一个时间是否介于两个时间之间.

```javascript
import isBetween from 'dayjs/plugin/isBetween'

dayjs.extend(isBetween)

dayjs('2010-10-20').isBetween('2010-10-19', dayjs('2010-10-25')); // true
```

## 自定义

你可以根据需要自由的编写一个Day.js插件
Expand Down

0 comments on commit b5fc3d1

Please sign in to comment.