mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 22:16:15 +00:00
10 lines
288 B
TypeScript
10 lines
288 B
TypeScript
import moment from 'moment';
|
|
|
|
export default function DateTime({ date, format = 'YYYY-MM-DD hh:mm:ss', className }: { date: string; format?: string; className?: string }) {
|
|
return (
|
|
<time dateTime={date} className={className}>
|
|
{moment(date).format(format)}
|
|
</time>
|
|
);
|
|
}
|