shellphone.app/app/blog/components/date.tsx

7 lines
227 B
TypeScript
Raw Normal View History

2021-08-30 15:19:33 +00:00
import { formatDate } from "../../core/helpers/date-formatter";
2021-08-27 16:08:38 +00:00
export default function DateComponent({ dateString }: any) {
const date = new Date(dateString);
2021-08-30 15:19:33 +00:00
return <time dateTime={dateString}>{formatDate(date)}</time>;
2021-08-27 16:08:38 +00:00
}