export function formatReservationDateTime(value: string | null | undefined): string {
  if (!value) {
    return '-'
  }
  return value.replace('T', ' ').replace(/\+.*$/, '')
}

export function formatReservationDateRange(arrivalDate: string, departureDate: string): string {
  return `${arrivalDate} / ${departureDate}`
}

export function formatReservationCurrency(amount: number, currencyCode: string): string {
  return new Intl.NumberFormat('zh-CN', {
    style: 'currency',
    currency: currencyCode,
    maximumFractionDigits: 0,
  }).format(amount)
}
