import type { OptimizationResultVersion } from "../../lib/cases/types";

export function formatDate(value: string) {
  return new Date(value).toLocaleString("zh-CN", {
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit",
  });
}

export function versionLabel(version: OptimizationResultVersion) {
  return `v${version.version} · ${
    version.status === "optimized" ? "已优化" : "失败"
  }`;
}

