From 6b555bf506121bc0360c16dc628cbd837db52ca1 Mon Sep 17 00:00:00 2001 From: iamkun Date: Sun, 24 Feb 2019 02:21:38 +0800 Subject: [PATCH] docs: update docs customParseFormat --- docs/en/Plugin.md | 2 +- docs/es-es/Plugin.md | 2 +- docs/ja/Plugin.md | 2 +- docs/ko/Plugin.md | 2 +- docs/pt-br/Plugin.md | 2 +- docs/zh-cn/Plugin.md | 2 +- types/index.d.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en/Plugin.md b/docs/en/Plugin.md index 0c70b7c70..313f2d908 100644 --- a/docs/en/Plugin.md +++ b/docs/en/Plugin.md @@ -261,7 +261,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 Enero 15', { format: 'YYYY MMMM DD', locale: 'es' }) +dayjs('2018 Enero 15', 'YYYY MMMM DD', 'es') // Returns an instance containing '2018-01-15T00:00:00.000Z' ``` diff --git a/docs/es-es/Plugin.md b/docs/es-es/Plugin.md index 626d8118b..d786eeecb 100644 --- a/docs/es-es/Plugin.md +++ b/docs/es-es/Plugin.md @@ -261,7 +261,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 Enero 15', { format: 'YYYY MMMM DD', locale: 'es' }) +dayjs('2018 Enero 15', 'YYYY MMMM DD', 'es') // Returns an instance containing '2018-01-15T00:00:00.000Z' ``` diff --git a/docs/ja/Plugin.md b/docs/ja/Plugin.md index c3a7ff656..8aed2916e 100644 --- a/docs/ja/Plugin.md +++ b/docs/ja/Plugin.md @@ -270,7 +270,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 5月 15', { format: 'YYYY MMMM DD', locale: 'ja' }) +dayjs('2018 5月 15', 'YYYY MMMM DD', 'ja') // Returns an instance containing '2018-05-15T00:00:00.000Z' ``` diff --git a/docs/ko/Plugin.md b/docs/ko/Plugin.md index 3b894c0d3..ce1447e80 100644 --- a/docs/ko/Plugin.md +++ b/docs/ko/Plugin.md @@ -262,7 +262,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 5월 15', { format: 'YYYY MMMM DD', locale: 'ko' }) +dayjs('2018 5월 15', 'YYYY MMMM DD', 'ko') // Returns an instance containing '2018-05-15T00:00:00.000Z' ``` diff --git a/docs/pt-br/Plugin.md b/docs/pt-br/Plugin.md index df125801a..e07051695 100644 --- a/docs/pt-br/Plugin.md +++ b/docs/pt-br/Plugin.md @@ -261,7 +261,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 Fevereiro 15', { format: 'YYYY MMMM DD', locale: 'pt_br' }) +dayjs('2018 Fevereiro 15', 'YYYY MMMM DD', 'pt_br') // Returns an instance containing '2018-02-15T00:00:00.000Z' ``` diff --git a/docs/zh-cn/Plugin.md b/docs/zh-cn/Plugin.md index 407ef92bb..3c9300260 100644 --- a/docs/zh-cn/Plugin.md +++ b/docs/zh-cn/Plugin.md @@ -261,7 +261,7 @@ dayjs.extend(customParseFormat) dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z') // Returns an instance containing '1969-05-02T18:02:03.000Z' -dayjs('2018 五月 15', { format: 'YYYY MMMM DD', locale: 'zh_cn' }) +dayjs('2018 五月 15', 'YYYY MMMM DD', 'zh_cn') // Returns an instance containing '2018-05-15T00:00:00.000Z' ``` diff --git a/types/index.d.ts b/types/index.d.ts index 24ac01f1c..c1db5910f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,5 +1,5 @@ export = dayjs; -declare function dayjs (date?: dayjs.ConfigType, option?: dayjs.OptionType): dayjs.Dayjs +declare function dayjs (date?: dayjs.ConfigType, option?: dayjs.OptionType, locale?: string): dayjs.Dayjs declare namespace dayjs { export type ConfigType = string | number | Date | Dayjs