format method

String format({
  1. String dateFormat = DateTimeFormatsVN.dateOnly,
})

Formats the DateTime object into a string using the specified format.

Parameters:

Returns:

  • A string representation of the DateTime object in the specified format.

Implementation

String format({
  String dateFormat = DateTimeFormatsVN.dateOnly,
}) {
  return DateFormat(dateFormat).format(toLocal());
}