Download next.js/examples/cms-tina/components/date-formatter.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 217 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-tina/components/date-formatter.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-tina/components/date-formatter.js
-
curl -L -o date-formatter.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-tina/components/date-formatter.js
217 Bytes
| import { parseISO, format } from "date-fns"; | |
| export default function DateFormatter({ dateString }) { | |
| const date = parseISO(dateString); | |
| return <time dateTime={dateString}>{format(date, "LLLL d, yyyy")}</time>; | |
| } | |