How can I convert using date-fns the following string into Date?
Jul-30-2021
(format MMM-DD-YYYY).
Using momentjs I can convert it using:
moment('Jul-30-2021', 'MMM-DD-YYYY')
<script type="module">
import { format } from 'https://esm.run/date-fns'
const date = new Date('Jul-30-2021');
console.log(date);
console.log(format(date, 'MMM-dd-yyyy, mm:HH:ss'));
</script>
Now you can apply the date-fns format(date, 'MMM-dd-yyyy')