I am trying to parse date using date-fns library but getting one day previous as result. How can I avoid this and get the right result?
start = '2021-08-16'
const parseStart = parse(start, 'yyyy-MM-dd', new Date());
output:
2021-08-15T18:30:00.000Z
new Date("2021-08-15T18:30:00.000Z")
should transform it back to your timezone – Endblowndate-fns-tz
if you need to deal with timezones. And good luck :) – Endblown