day static method

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

Formatting just the day.

Example:

import 'package:intl4x/datetime_format.dart';

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

Implementation

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