formatDate method

String formatDate()

Formats the date to a readable string (e.g., 'MMM dd, yyyy').

Implementation

String formatDate() {
  return '${month.toString().padLeft(2, '0')}/${day.toString().padLeft(2, '0')}/$year';
}