Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Nov 9, 2023
1 parent 786f170 commit e4e55fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ The `isValid` method used to accept any type of value and tried to parse them be
The method has been simplified and now only accepts an already-parsed date or `null` (ie: the same formats used by the `value` prop in our components)

Check warning on line 85 in docs/data/migration/migration-pickers-v6/migration-pickers-v6.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.We] Try to avoid using first-person plural like 'our'. Raw Output: {"message": "[Google.We] Try to avoid using first-person plural like 'our'.", "location": {"path": "docs/data/migration/migration-pickers-v6/migration-pickers-v6.md", "range": {"start": {"line": 85, "column": 136}}}, "severity": "WARNING"}

```diff
const adapterDayjs = new AdapterDayjs();
const adapterLuxon = new AdapterLuxon();
const adapterDateFns = new AdapterDateFns();
const adapterMoment = new AdatperMoment();

// Supported formats
const isValid = adapterDayjs.isValid(null); // Same for the other adapters
const isValid = adapterLuxon.isValid(DateTime.now());
const isValid = adapterMoment.isValid(moment());
const isValid = adapterDateFns.isValid(new Date());

// Non-supported formats (JS Date)
const adapterDayjs = new AdapterDayjs();
const adapterLuxon = new AdapterLuxon();
const adapterDateFns = new AdapterDateFns();
const adapterMoment = new AdatperMoment();

// Supported formats
const isValid = adapterDayjs.isValid(null); // Same for the other adapters
const isValid = adapterLuxon.isValid(DateTime.now());
const isValid = adapterMoment.isValid(moment());
const isValid = adapterDateFns.isValid(new Date());

// Non-supported formats (JS Date)
- const isValid = adapterDayjs.isValid(new Date('2022-04-17'));
+ const isValid = adapterDayjs.isValid(dayjs('2022-04-17'));

Expand Down

0 comments on commit e4e55fd

Please sign in to comment.