String dayOfWeek(int day) {
  const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  if (day >= 1 && day <= 7) return days[day - 1];
  return '';
}

String monthName(int month) {
  const months = ['January', 'February', 'March', 'April', 'May', 'June',
    'July', 'August', 'September', 'October', 'November', 'December'];
  if (month >= 1 && month <= 12) return months[month - 1];
  return '';
}

String formatTimeOfDay(int hour, int minute) {
  final period = hour >= 12 ? 'PM' : 'AM';
  final h = hour > 12 ? hour - 12 : (hour == 0 ? 12 : hour);
  final m = minute.toString().padLeft(2, '0');
  return '$h:$m $period';
}
