Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

354 B
Raw Blame
import { formatDate } from "../../theme/hootFormat";

/** How the key list shows when a key stops working. */
export function formatKeyExpiry(expiresAt: string | null, now: Date): string {
  if (expiresAt === null) return "No expiry";
  const formatted = formatDate(expiresAt);
  return new Date(expiresAt) <= now ? `Expired ${formatted}` : formatted;
}