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)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more