custom static method

String Function(DateTime) custom(
  1. String pattern, [
  2. String locale = 'en_US'
])

Creates a formatter for custom pattern

Implementation

static String Function(DateTime) custom(
  String pattern, [
  String locale = 'en_US',
]) {
  return DateFormatterBuilder()
      .locale(locale)
      .customDatePattern(pattern)
      .excludeTime()
      .build();
}