DEV Community

Vicente G. Reyes
Vicente G. Reyes

Posted on

RangeError: Invalid time value - date-fns

0

I'm doing the nextJs tutorial and have run into a problem with the date.js file.

import { parseISO, format } from 'date-fns'

export default function Date({ dateString }) {
  const date = parseISO(dateString)
  return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
}

The error is:

What's wrong with what I did?

Top comments (0)