DEV Community

Vicente Antonio G. Reyes
Vicente Antonio G. Reyes

Posted on

RangeError: Invalid time value - date-fns


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)