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