export function DateWidget(p: { time: number }): React.ReactElement {
  const date = new Date(p.time * 1000);

  return (
    <>
      {pad(date.getDate())}/{pad(date.getMonth() + 1)}/{date.getFullYear()}
    </>
  );
}

function pad(num: number): string {
  return num.toString().padStart(2, "0");
}
