From e0f23e5f615435a22b0974ca59d44f66f98a3dbf Mon Sep 17 00:00:00 2001 From: Erik Ostrom Date: Sat, 23 Mar 2019 18:35:13 -0500 Subject: [PATCH] Updated `parse` doc re: 2.0 changes Looks like this was updated when `parse` was renamed to `toDate`, (#375), but fell behind when ISO parsing was extracted from `toDate` into `parseISO` (#1023). --- src/parse/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/parse/index.js b/src/parse/index.js index c18b3f7ac7..9ed0e5f233 100644 --- a/src/parse/index.js +++ b/src/parse/index.js @@ -272,7 +272,8 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/ * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * - * - Old `parse` was renamed to `toDate`. + * - Old `parse` was split into [parseISO]{@link https://date-fns.org/docs/parseISO} (parses an ISO 8601 string) + and [toDate]{@link https://date-fns.org/docs/toDate} (converts a number or Date). * Now `parse` is a new function which parses a string using a provided format. * * ```javascript @@ -280,7 +281,8 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/ * parse('2016-01-01') * * // v2.0.0 onward - * toDate('2016-01-01') + * toDate(1451606400000) + * parseISO('2016-01-01') * parse('2016-01-01', 'yyyy-MM-dd', new Date()) * ``` *