monthName method

String monthName()

Returns the abbreviated month name (e.g., "Jan", "Feb", etc.)

Example:

SlickDateTime(DateTime(2025, 3, 1)).monthName(); // "Mar"

Implementation

String monthName() {
  if (_isNA) return 'N/A';
  const months = [
    'Jan',
    'Feb',
    'Mar',
    'Apr',
    'May',
    'Jun',
    'Jul',
    'Aug',
    'Sep',
    'Oct',
    'Nov',
    'Dec',
  ];
  return months[this!.month - 1];
}