formatMonth function
Format a month from a given DateTime object to its full name.
date is the DateTime object to format.
Returns the full name of the month.
Implementation
String formatMonth(DateTime date) {
return [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
][date.month - 1];
}