diff --git a/docs/es-es/API-reference.md b/docs/es-es/API-reference.md index 2fc5b0660..e7504ee62 100644 --- a/docs/es-es/API-reference.md +++ b/docs/es-es/API-reference.md @@ -43,9 +43,9 @@ El objeto `Dayjs` es inmutable, por lo que toda operación de la API que altere - [Como objeto `.toObject()`](#como-objecto-toobject) - [Como cadena `.toString()`](#como-cadena-tostring) - [Consulta](#consulta) - - [Anterior a `.isBefore(compared: Dayjs)`](#anterior-a-isbeforecompared-dayjs) - - [Igual que `.isSame(compared: Dayjs)`](#igual-que-issamecompared-dayjs) - - [Posterior a `.isAfter(compared: Dayjs)`](#posterior-a-isaftercompared-dayjs) + - [Anterior a `.isBefore(compared: Dayjs, unit?: string)`](#anterior-a-isbeforecompared-dayjs-unit-string) + - [Igual que `.isSame(compared: Dayjs, unit?: string)`](#igual-que-issamecompared-dayjs-unit-string) + - [Posterior a `.isAfter(compared: Dayjs, unit?: string)`](#posterior-a-isaftercompared-dayjs-unit-string) - [Es Dayjs `.isDayjs()`](#es-dayjs-isdayjscompared-any) - [API de complementos](#api-de-complementos) - [RelativeTime](#relativetime) @@ -383,28 +383,31 @@ dayjs('2019-01-25').toString(); // 'Fri, 25 Jan 2019 02:00:00 GMT' ## Consulta -### Anterior a `.isBefore(compared: Dayjs)` +### Anterior a `.isBefore(compared: Dayjs, unit?: string)` Devuelve un dato de tipo `boolean`, que indica si la fecha del objeto `Dayjs` inicial es anterior o no a la fecha del objeto `Dayjs` a comparar. ```js dayjs().isBefore(dayjs()); // false +dayjs().isBefore(dayjs(), 'year'); // false ``` -### Igual que `.isSame(compared: Dayjs)` +### Igual que `.isSame(compared: Dayjs, unit?: string)` Devuelve un dato de tipo `boolean`, que indica si la fecha del objeto `Dayjs` inicial es igual o no que la fecha del objeto `Dayjs` a comparar. ```js dayjs().isSame(dayjs()); // true +dayjs().isSame(dayjs(), 'year'); // true ``` -### Posterior a `.isAfter(compared: Dayjs)` +### Posterior a `.isAfter(compared: Dayjs, unit?: string)` Devuelve un dato de tipo `boolean`, que indica si la fecha del objeto `Dayjs` inicial es posterior o no a la fecha del objeto `Dayjs` a comparar. ```js dayjs().isAfter(dayjs()); // false +dayjs().isAfter(dayjs(), 'year'); // false ``` ### Es Dayjs `.isDayjs(compared: any)` diff --git a/docs/ja/API-reference.md b/docs/ja/API-reference.md index a181b3750..d13bb6d16 100644 --- a/docs/ja/API-reference.md +++ b/docs/ja/API-reference.md @@ -451,8 +451,9 @@ dayjs().toString(); `Dayjs` オブジェクトが別の `Dayjs` オブジェクト以前の値かどうかを判定します。 ```js -dayjs().isBefore(Dayjs); +dayjs().isBefore(Dayjs, unit? : String); dayjs().isBefore(dayjs()); // false +dayjs().isBefore(dayjs(), 'year'); // false ``` #### Is Same @@ -462,8 +463,9 @@ dayjs().isBefore(dayjs()); // false `Dayjs` オブジェクトが別の `Dayjs` オブジェクトの値と等しいかどうかを判定します。 ```js -dayjs().isSame(Dayjs); +dayjs().isSame(Dayjs, unit? : String); dayjs().isSame(dayjs()); // true +dayjs().isSame(dayjs(), 'year'); // true ``` #### Is After @@ -473,8 +475,9 @@ dayjs().isSame(dayjs()); // true `Dayjs` オブジェクトが別の `Dayjs` オブジェクト以降の値かどうかを判定します。 ```js -dayjs().isAfter(Dayjs); +dayjs().isAfter(Dayjs, unit? : String); dayjs().isAfter(dayjs()); // false +dayjs().isAfter(dayjs(), 'year'); // false ``` ### Is a Dayjs `.isDayjs(compared: any)` diff --git a/docs/ko/API-reference.md b/docs/ko/API-reference.md index 99a5c7c7f..f97298b67 100644 --- a/docs/ko/API-reference.md +++ b/docs/ko/API-reference.md @@ -42,9 +42,9 @@ Day.js는 네이티브 `Date.prototype`을 수정하는 대신 `Dayjs` 오브젝 - [As Object `.toObject()`](#as-object-toobject) - [As String `.toString()`](#as-string-tostring) - [Query](#query) - - [Is Before `.isBefore(compared: Dayjs)`](#is-before-isbeforecompared--dayjs) - - [Is Same `.isSame(compared: Dayjs)`](#is-same-issamecompared--dayjs) - - [Is After `.isAfter(compared: Dayjs)`](#is-after-isaftercompared--dayjs) + - [Is Before `.isBefore(compared: Dayjs, unit?: string)`](#is-before-isbeforecompared--dayjs-unit-string) + - [Is Same `.isSame(compared: Dayjs, unit?: string)`](#is-same-issamecompared--dayjs-unit-string) + - [Is After `.isAfter(compared: Dayjs, unit?: string)`](#is-after-isaftercompared--dayjs-unit-string) - [Is a Dayjs `.isDayjs()`](#is-a-dayjs-isdayjscompared-any) - [Plugin APIs](#plugin-apis) - [RelativeTime](#relativetime) @@ -382,28 +382,31 @@ dayjs('2019-01-25').toString(); // 'Fri, 25 Jan 2019 02:00:00 GMT' ## Query -### Is Before `.isBefore(compared: Dayjs)` +### Is Before `.isBefore(compared: Dayjs, unit?: string)` `Dayjs`가 다른 `Dayjs`보다 앞선 시점인지를 확인합니다. 반환 타입은 `boolean` 입니다. ```js dayjs().isBefore(dayjs()); // false +dayjs().isBefore(dayjs(), 'year'); // false ``` -### Is Same `.isSame(compared: Dayjs)` +### Is Same `.isSame(compared: Dayjs, unit?: string)` `Dayjs`가 다른 `Dayjs`과 동일한 시점인지를 확인합니다. 반환 타입은 `boolean` 입니다. ```js dayjs().isSame(dayjs()); // true +dayjs().isSame(dayjs(), 'year'); // true ``` -### Is After `.isAfter(compared: Dayjs)` +### Is After `.isAfter(compared: Dayjs, unit?: string)` `Dayjs`가 다른 `Dayjs`보다 뒷선 시점인지를 확인합니다. 반환 타입은 `boolean` 입니다. ```js dayjs().isAfter(dayjs()); // false +dayjs().isAfter(dayjs(), 'year'); // false ``` ### Is a Dayjs `.isDayjs(compared: any)` diff --git a/docs/pt-br/API-reference.md b/docs/pt-br/API-reference.md index 60414ae5e..ee21167dc 100644 --- a/docs/pt-br/API-reference.md +++ b/docs/pt-br/API-reference.md @@ -43,9 +43,9 @@ O objeto `Dayjs` é imutável, ou seja, todas as operações da API que alteram - [Como Objeto `.toObject()`](#como-objeto-toobject) - [Como String `.toString()`](#como-string-tostring) - [Consulta](#consulta) - - [Antes `.isBefore(compared: Dayjs)`](#antes-isbeforecompared-dayjs) - - [Igual `.isSame(compared: Dayjs)`](#igual-issamecompared-dayjs) - - [Depois `.isAfter(compared: Dayjs)`](#depois-isaftercompared-dayjs) + - [Antes `.isBefore(compared: Dayjs, unit?: string)`](#antes-isbeforecompared-dayjs-unit-string) + - [Igual `.isSame(compared: Dayjs, unit?: string)`](#igual-issamecompared-dayjs-unit-string) + - [Depois `.isAfter(compared: Dayjs, unit?: string)`](#depois-isaftercompared-dayjs-unit-string) - [É um objeto `Dayjs` `.isDayjs()`](#é-um-objeto-dayjs-isdayjs) - [Plugin APIs](#plugin-apis) - [RelativeTime](#relativetime) @@ -381,28 +381,31 @@ dayjs('2019-01-25').toString(); // 'Fri, 25 Jan 2019 02:00:00 GMT' ## Consulta -### Antes `.isBefore(compared: Dayjs)` +### Antes `.isBefore(compared: Dayjs, unit?: string)`] Retorna um `boolean` indicando se a data do objeto `Dayjs` é antes da data fornecida de em outro objeto `Dayjs`. ```js dayjs().isBefore(dayjs()); // false +dayjs().isBefore(dayjs(), 'year'); // false ``` -### Igual `.isSame(compared: Dayjs)` +### Igual `.isSame(compared: Dayjs, unit?: string)`] Retorna um `boolean` indicando se a data do objeto `Dayjs` é a mesma data fornecida de em outro objeto `Dayjs`. ```js -dayjs().isBefore(dayjs()); // false +dayjs().isSame(dayjs()); // true +dayjs().isSame(dayjs(), 'year'); // true ``` -### Depois `.isAfter(compared: Dayjs)` +### Depois `.isAfter(compared: Dayjs, unit?: string)`] Retorna um `boolean` indicando se a data do objeto `Dayjs` é depois da data fornecida de em outro objeto `Dayjs`. ```js dayjs().isAfter(dayjs()); // false +dayjs().isAfter(dayjs(), 'year'); // false ``` ### É um objeto `Dayjs` `.isDayjs()` diff --git a/docs/zh-cn/API-reference.md b/docs/zh-cn/API-reference.md index b590055a9..59e883ca1 100644 --- a/docs/zh-cn/API-reference.md +++ b/docs/zh-cn/API-reference.md @@ -338,24 +338,27 @@ dayjs().toString(); 检查一个 `Dayjs` 对象是否在另一个 `Dayjs` 对象时间之前。 ```js -dayjs().isBefore(Dayjs); +dayjs().isBefore(Dayjs, unit? : String); dayjs().isBefore(dayjs()); // false +dayjs().isBefore(dayjs(), 'year'); // false ``` #### 是否相同 - return Boolean 检查一个 `Dayjs` 对象是否和另一个 `Dayjs` 对象时间相同。 ```js -dayjs().isSame(Dayjs); +dayjs().isSame(Dayjs, unit? : String); dayjs().isSame(dayjs()); // true +dayjs().isSame(dayjs(), 'year'); // true ``` #### 是否之后 - return Boolean 检查一个 `Dayjs` 对象是否在另一个 `Dayjs` 对象时间之后。 ```js -dayjs().isAfter(Dayjs); +dayjs().isAfter(Dayjs, unit? : String); dayjs().isAfter(dayjs()); // false +dayjs().isAfter(dayjs(), 'year'); // false ``` ### 是否是 Dayjs `.isDayjs(compared: any)`