Download next.js/examples/cms-graphcms/components/date.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 208 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-graphcms/components/date.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-graphcms/components/date.js
-
curl -L -o date.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-graphcms/components/date.js
208 Bytes
| 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>; | |
| } | |