import { useTranslation } from "next-i18next"
type HumanDateProps = {
date: Date
}
/**
* Component that formats a {@link Date} to a machine-readable and human-readable HTML `time[datetime]` element.
*/
export function FestaMoment({ date }: HumanDateProps) {
const { t } = useTranslation()
if (Number.isNaN(date.getTime())) {
return (
{t("dateNaN")}
)
}
return (
)
}