Skip to content

Commit

Permalink
docs: Add IsoWeeksInYear docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Mar 28, 2019
1 parent 2db8631 commit 71e4bff
Show file tree
Hide file tree
Showing 12 changed files with 128 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/en/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)

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

### IsoWeeksInYear

`.isoWeeksInYear` to get the number of weeks in year

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

### IsSameOrAfter

`.isSameOrAfter` to check if a date is same of after another date
Expand Down Expand Up @@ -477,12 +483,12 @@ plugin [`ToArray`](./Plugin.md#toarray)

### ToObject

`.toObject` to return an `object` with the date's properties.
`.toObject` to return an `object` with the date's properties

plugin [`ToObject`](./Plugin.md#toobject)

### MinMax

`.min` `.max` to compare given dayjs instances.
`.min` `.max` to compare given dayjs instances

plugin [`MinMax`](./Plugin.md#minmax)
15 changes: 15 additions & 0 deletions docs/en/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,21 @@ dayjs('2018-06-27').week() // 26
dayjs('2018-06-27').week(5) // set week
```

### IsoWeeksInYear

- IsoWeeksInYear adds `.isoWeeksInYear()` API to return a `number` to get the number of weeks in year, according to ISO weeks.

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear adds `.quarter()` API to return to which quarter of the year belongs a date, and extends `.add` `.subtract` `.startOf` `.endOf` APIs to support unit `quarter`.
Expand Down
6 changes: 6 additions & 0 deletions docs/es-es/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ complemento [`IsLeapYear`](./Plugin.md#isleapyear)

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

### IsoWeeksInYear

`.isoWeeksInYear` to get the number of weeks in year

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

### IsSameOrAfter

`.isSameOrAfter` to check if a date is same of after another date
Expand Down
15 changes: 15 additions & 0 deletions docs/es-es/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,21 @@ dayjs('2018-06-27').week() // 26
dayjs('2018-06-27').week(5) // set week
```

### IsoWeeksInYear

- IsoWeeksInYear adds `.isoWeeksInYear()` API to return a `number` to get the number of weeks in year, according to ISO weeks.

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear add `.quarter()` API to return to which quarter of the year belongs a date, and extends `.add` `.subtract` `.startOf` `.endOf` APIs to support unit `quarter`.
Expand Down
6 changes: 6 additions & 0 deletions docs/ja/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,12 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)

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

### IsoWeeksInYear

`.isoWeeksInYear` to get the number of weeks in year

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

#### IsSameOrAfter

`.isSameOrAfter` はある日付が別の日付と同じまたは以降かどうかを判定します。
Expand Down
15 changes: 15 additions & 0 deletions docs/ja/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,21 @@ dayjs('06/27/2018').week() // 26
dayjs('2018-06-27').week(5) // set week
```

### IsoWeeksInYear

- IsoWeeksInYear adds `.isoWeeksInYear()` API to return a `number` to get the number of weeks in year, according to ISO weeks.

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear add `.quarter()` API to return to which quarter of the year belongs a date, and extends `.add` `.subtract` `.startOf` `.endOf` APIs to support unit `quarter`.
Expand Down
6 changes: 6 additions & 0 deletions docs/ko/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,12 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)

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

### IsoWeeksInYear

`.isoWeeksInYear` to get the number of weeks in year

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

### IsSameOrAfter

`.isSameOrAfter` to check if a date is same of after another date
Expand Down
15 changes: 15 additions & 0 deletions docs/ko/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,21 @@ dayjs('06/27/2018').week() // 26
dayjs('2018-06-27').week(5) // set week
```

### IsoWeeksInYear

- IsoWeeksInYear adds `.isoWeeksInYear()` API to return a `number` to get the number of weeks in year, according to ISO weeks.

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear add `.quarter()` API to return to which quarter of the year belongs a date, and extends `.add` `.subtract` `.startOf` `.endOf` APIs to support unit `quarter`.
Expand Down
6 changes: 6 additions & 0 deletions docs/pt-br/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ plugin [`IsLeapYear`](./Plugin.md#isleapyear)

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

### IsoWeeksInYear

`.isoWeeksInYear` to get the number of weeks in year

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

### IsSameOrAfter

`.isSameOrAfter` to check if a date is same of after another date
Expand Down
15 changes: 15 additions & 0 deletions docs/pt-br/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,21 @@ dayjs('06/27/2018').week() // 26
dayjs('2018-06-27').week(5) // set week
```

### IsoWeeksInYear

- IsoWeeksInYear adds `.isoWeeksInYear()` API to return a `number` to get the number of weeks in year, according to ISO weeks.

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear add `.quarter()` API to return to which quarter of the year belongs a date, and extends `.add` `.subtract` `.startOf` `.endOf` APIs to support unit `quarter`.
Expand Down
6 changes: 6 additions & 0 deletions docs/zh-cn/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@ dayjs() instanceof dayjs // true

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

### 年中有几周 ISO

`.isoWeeksInYear` 获得年中有几周

plugin [`IsoWeeksInYear`](./Plugin.md#isoweeksinyear)

### 是否相同或之后

`.isSameOrAfter` 返回一个时间和一个时间相同或在一个时间之后
Expand Down
15 changes: 15 additions & 0 deletions docs/zh-cn/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,21 @@ dayjs('06/27/2018').week() // 26
dayjs('2018-06-27').week(5) // 设置周
```

### IsoWeeksInYear

- IsoWeeksInYear 增加了 `.isoWeeksInYear()` API 返回一个 `number` 来得到依据 ISO week 标准一年中有几周

```javascript
import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear'
import isLeapYear from 'dayjs/plugin/isLeapYear' // rely on isLeapYear plugin

dayjs.extend(isoWeeksInYear)
dayjs.extend(isLeapYear)

dayjs('2004-01-01').isoWeeksInYear() // 53
dayjs('2005-01-01').isoWeeksInYear() // 52
```

### QuarterOfYear

- QuarterOfYear 增加了 `.quarter()` API 返回一个 `number` 来表示 `Dayjs` 的日期是第几个季度,并扩展了 `.add` `.subtract` `.startOf` `.endOf` API 来支持 `quarter` 季度单位。
Expand Down

0 comments on commit 71e4bff

Please sign in to comment.