import { time, datetime } from "@/boxes/human"
export { title as titlecase, time, datetime, compact as number, duration, truncate, truncateMid as truncateMiddle, plural as pluralize } from "@/boxes/human"

export function todayTimeOrDateTime(input: number): string {
  const date = new Date(input)
  const now = new Date()
  const isToday =
    date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate()

  return isToday ? time(input) : datetime(input)
}

export * as Locale from "./locale"
