// the app's short date labels, locale-default; one place instead of inline
// toLocaleDateString options per screen

export const formatDayDate = (date: Date | string): string =>
  new Date(date).toLocaleDateString(undefined, {
    weekday: 'short',
    month: 'short',
    day: 'numeric',
  })

export const formatShortDate = (date: Date | string): string =>
  new Date(date).toLocaleDateString(undefined, {
    month: 'short',
    day: 'numeric',
  })

export const formatMonthYear = (date: Date | string): string =>
  new Date(date).toLocaleDateString(undefined, {
    month: 'short',
    year: 'numeric',
  })

export const formatDateTime = (date: Date | string): string =>
  new Date(date).toLocaleString()
