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