7 lines
208 B
JavaScript
7 lines
208 B
JavaScript
|
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>;
|
||
|
}
|