monthDayTime static method

DateTimeFormatter monthDayTime({
  1. Locale? locale,
  2. DateTimeAlignment? alignment,
  3. DateTimeLength? length,
  4. TimePrecision? timePrecision,
})

Formatting the month, day, and time.

Example:

import 'package:intl4x/datetime_format.dart';

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

Implementation

static DateTimeFormatter monthDayTime({
  Locale? locale,
  DateTimeAlignment? alignment,
  DateTimeLength? length,
  TimePrecision? timePrecision,
}) => DateTimeFormatImpl.build(
  locale ?? findSystemLocale(),
).mdt(alignment: alignment, length: length, timePrecision: timePrecision);