monthDay static method

DateTimeFormatter monthDay({
  1. Locale? locale,
  2. DateTimeAlignment? alignment,
  3. DateTimeLength? length,
})

Formatting the month and day.

Example:

import 'package:intl4x/datetime_format.dart';

void main() {
  final date = DateTime(2021, 12, 17, 4, 0, 42);
  print(DateTimeFormat.monthDay().format(date)); // Output: 'Dec 17'
}

Implementation

static DateTimeFormatter monthDay({
  Locale? locale,
  DateTimeAlignment? alignment,
  DateTimeLength? length,
}) => DateTimeFormatImpl.build(
  locale ?? findSystemLocale(),
).md(alignment: alignment, length: length);