monthAsString function

String monthAsString (
  1. DateTime date
)

Returns given DateTime's month as a # String formatted MM (ex. '04').

Implementation

String monthAsString(DateTime date) {
  return formatDate(date: date, format: 'MM');
}