---

import type { HTMLAttributes } from 'astro/types';

interface Props extends Omit<HTMLAttributes<'time'>, 'datetime'> {
  date: Date;
}

const { date, ...rest } = Astro.props;
---

<time {...rest} datetime={date.toISOString()}>
  {
    date.toLocaleDateString("en-us", {
      year: "numeric",
      month: "short",
      day: "numeric",
    })
  }
</time>
