Skip to content

Commit

Permalink
docs: update other docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Mar 7, 2019
1 parent 2cd998f commit 785405f
Show file tree
Hide file tree
Showing 10 changed files with 229 additions and 123 deletions.
39 changes: 14 additions & 25 deletions docs/es-es/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ El objeto `Dayjs` es inmutable, por lo que toda operación de la API que altere
- [UTC offset (minutos) `.utcOffset()`](#utc-offset-minutos-utcoffset)
- [Días en el mes `.daysInMonth()`](#días-en-el-mes-daysinmonth)
- [Como objeto `Date` `.toDate()`](#como-objeto-date-todate)
- [Como array `.toArray()`](#como-array-toarray)
- [Como JSON `.toJSON()`](#como-json-tojson)
- [Como cadena ISO 8601 `.toISOString()`](#como-cadena-iso-8601-toisostring)
- [Como objeto `.toObject()`](#como-objecto-toobject)
- [Como cadena `.toString()`](#como-cadena-tostring)
- [Consulta](#consulta)
- [Anterior a `.isBefore(compared: Dayjs, unit?: string)`](#anterior-a-isbeforecompared-dayjs-unit-string)
Expand All @@ -58,6 +56,8 @@ El objeto `Dayjs` es inmutable, por lo que toda operación de la API que altere
- [IsSameOrBefore](#issameorbefore)
- [IsBetween](#isbetween)
- [QuarterOfYear](#quarterofyear)
- [ToArray](#toarray)
- [ToObject](#toobject)

## Análisis

Expand Down Expand Up @@ -354,14 +354,6 @@ Devuelve un objeto `Date` nativo, obtenido a partir del objeto `Dayjs`.
dayjs('2019-01-25').toDate()
```

### Como array `.toArray()`

Devuelve un array que reproduce los parámetros de `new Date()`.

```js
dayjs('2019-01-25').toArray() // [ 2019, 0, 25, 0, 0, 0, 0 ]
```

### Como JSON `.toJSON()`

Devuelve un objeto `Dayjs` formateado como una cadena ISO8601.
Expand All @@ -378,21 +370,6 @@ Devuelve un objeto `Dayjs` formateado como una cadena ISO8601.
dayjs('2019-01-25').toISOString() // '2019-01-25T02:00:00.000Z'
```

### Como objecto `.toObject()`

Devuelve un dato de tipo `object`, con las propiedades de la fecha.

```js
dayjs('2019-01-25').toObject()
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */
```

### Como cadena `.toString()`

Devuelve un dato de tipo `string`, que representa la fecha.
Expand Down Expand Up @@ -492,3 +469,15 @@ complemento [`IsBetween`](./Plugin.md#isbetween)
`.quarter` to get quarter of the year

plugin [`QuarterOfYear`](./Plugin.md#quarterofyear)

### ToArray

`.toArray` to return an `array` that mirrors the parameters

plugin [`ToArray`](./Plugin.md#toarray)

### ToObject

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

plugin [`ToObject`](./Plugin.md#toobject)
31 changes: 31 additions & 0 deletions docs/es-es/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,37 @@ dayjs('2018 Enero 15', 'YYYY MMMM DD', 'es')
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |

### ToArray

- ToArray add `.toArray()` API to return an `array` that mirrors the parameters

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

dayjs.extend(toArray)

dayjs('2019-01-25').toArray() // [ 2019, 0, 25, 0, 0, 0, 0 ]
```

### ToObject

- ToObject add `.toObject()` API to return an `object` with the date's properties.

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

dayjs.extend(toObject)

dayjs('2019-01-25').toObject()
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */
```

## Personalización

Puedes construir tu propio complemento de Day.js para cubrir tus necesidades.
Expand Down
36 changes: 14 additions & 22 deletions docs/ja/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ Day.js は組み込みの `Date.prototype` を変更する代わりに `Dayjs`
- [UTC offset (minutes)](#utc-offset-minutes-utcoffset)
- [Days in Month](#days-in-month)
- [As Javascript Date](#as-javascript-date)
- [As Array](#as-array)
- [As JSON](#as-json)
- [As ISO 8601 String](#as-iso-8601-string)
- [As Object](#as-object)
- [As String](#as-string)
- [Query](#query)
- [Is Before](#is-before)
Expand All @@ -55,6 +53,8 @@ Day.js は組み込みの `Date.prototype` を変更する代わりに `Dayjs`
- [IsSameOrBefore](#issameorbefore)
- [IsBetween](#isbetween)
- [QuarterOfYear](#quarterofyear)
- [ToArray](#toarray)
- [ToObject](#toobject)

---

Expand Down Expand Up @@ -408,16 +408,6 @@ dayjs().daysInMonth()
dayjs().toDate()
```

#### As Array

- Array を返します

Date コンストラクタパラメータに対応する値の配列を返します。

```js
dayjs().toArray() //[2018, 8, 18, 00, 00, 00, 000];
```

#### As JSON

- JSON String を返します
Expand All @@ -438,16 +428,6 @@ ISO8601 形式の文字列にフォーマットします。
dayjs().toISOString()
```

#### As Object

- Object を返します

年、月、...(中略)...、ミリ秒のオブジェクトを返します。

```js
dayjs().toObject() // { years:2018, months:8, date:18, hours:0, minutes:0, seconds:0, milliseconds:0}
```

#### As String

- String を返します
Expand Down Expand Up @@ -561,3 +541,15 @@ plugin [`IsBetween`](./Plugin.md#isbetween)
`.quarter` to get quarter of the year

plugin [`QuarterOfYear`](./Plugin.md#quarterofyear)

### ToArray

`.toArray` to return an `array` that mirrors the parameters

plugin [`ToArray`](./Plugin.md#toarray)

### ToObject

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

plugin [`ToObject`](./Plugin.md#toobject)
31 changes: 31 additions & 0 deletions docs/ja/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,37 @@ dayjs('2018 5月 15', 'YYYY MMMM DD', 'ja')
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |

### ToArray

- ToArray add `.toArray()` API to return an `array` that mirrors the parameters

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

dayjs.extend(toArray)

dayjs('2019-01-25').toArray() // [ 2019, 0, 25, 0, 0, 0, 0 ]
```

### ToObject

- ToObject add `.toObject()` API to return an `object` with the date's properties.

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

dayjs.extend(toObject)

dayjs('2019-01-25').toObject()
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */
```

## カスタマイズ

さまざまなニーズに合わせて独自の Day.js プラグインを構築することができます。
Expand Down
39 changes: 14 additions & 25 deletions docs/ko/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ Day.js는 네이티브 `Date.prototype`을 수정하는 대신 `Dayjs` 오브젝
- [UTC offset (minutes) `.utcOffset()`](#utc-offset-minutes-utcoffset)
- [Days in the Month `.daysInMonth()`](#days-in-the-month-daysinmonth)
- [As Javascript Date `.toDate()`](#as-javascript-date-todate)
- [As Array `.toArray()`](#as-array-toarray)
- [As JSON `.toJSON()`](#as-json-tojson)
- [As ISO 8601 String `.toISOString()`](#as-iso-8601-string-toisostring)
- [As Object `.toObject()`](#as-object-toobject)
- [As String `.toString()`](#as-string-tostring)
- [Query](#query)
- [Is Before `.isBefore(compared: Dayjs, unit?: string)`](#is-before-isbeforecompared--dayjs-unit-string)
Expand All @@ -57,6 +55,8 @@ Day.js는 네이티브 `Date.prototype`을 수정하는 대신 `Dayjs` 오브젝
- [IsSameOrBefore](#issameorbefore)
- [IsBetween](#isbetween)
- [QuarterOfYear](#quarterofyear)
- [ToArray](#toarray)
- [ToObject](#toobject)

## Parsing

Expand Down Expand Up @@ -353,14 +353,6 @@ dayjs('2019-01-25').daysInMonth() // 31
dayjs('2019-01-25').toDate()
```

### As Array `.toArray()`

새로운 `Date()`로부터 매개변수로 입력한 날짜를 가져옵니다. 반환 타입은 `array` 입니다.

```js
dayjs('2019-01-25').toArray() // [ 2019, 01, 25, 0, 0, 0, 0 ]
```

### As JSON `.toJSON()`

ISO8601에 대한 형식으로 `Dayjs`를 출력합니다. 반환 타입은 `string` 입니다.
Expand All @@ -377,21 +369,6 @@ ISO8601에 대한 형식으로 `Dayjs`를 출력합니다. 반환 타입은 `str
dayjs('2019-01-25').toISOString() // '2019-01-25T02:00:00.000Z'
```

### As Object `.toObject()`

날짜 속성을 가진 `object` 타입 값으로 반환합니다.

```js
dayjs('2019-01-25').toObject()
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */
```

### As String `.toString()`

날짜를 `string` 타입 값으로 반환합니다.
Expand Down Expand Up @@ -491,3 +468,15 @@ plugin [`IsBetween`](./Plugin.md#isbetween)
`.quarter` to get quarter of the year

plugin [`QuarterOfYear`](./Plugin.md#quarterofyear)

### ToArray

`.toArray` to return an `array` that mirrors the parameters

plugin [`ToArray`](./Plugin.md#toarray)

### ToObject

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

plugin [`ToObject`](./Plugin.md#toobject)
31 changes: 31 additions & 0 deletions docs/ko/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@ dayjs('2018 5월 15', 'YYYY MMMM DD', 'ko')
| `A` | AM PM | Post or ante meridiem, upper-case |
| `a` | am pm | Post or ante meridiem, lower-case |

### ToArray

- ToArray add `.toArray()` API to return an `array` that mirrors the parameters

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

dayjs.extend(toArray)

dayjs('2019-01-25').toArray() // [ 2019, 0, 25, 0, 0, 0, 0 ]
```

### ToObject

- ToObject add `.toObject()` API to return an `object` with the date's properties.

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

dayjs.extend(toObject)

dayjs('2019-01-25').toObject()
/* { years: 2019,
months: 0,
date: 25,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0 } */
```

## Customize

다양한 요구를 충족하기위해 자신만의 Day.js 플러그인을 만들 수 있습니다.
Expand Down
Loading

0 comments on commit 785405f

Please sign in to comment.