/**
 * Date and time formatting utilities
 */

import { format } from 'date-fns';

export function formatDate(date: string | Date | null | undefined): string {
  if (!date) return 'N/A';
  try {
    return format(new Date(date), 'MMM d, yyyy');
  } catch {
    return 'N/A';
  }
}

export function formatDateTime(date: string | Date | null | undefined): string {
  if (!date) return 'N/A';
  try {
    return format(new Date(date), 'MMM d, yyyy HH:mm');
  } catch {
    return 'N/A';
  }
}

