format method
Formats the DateTime object into a string using the specified format.
Parameters:
dateFormat
: The format to use for the date. Defaults to DateTimeFormatsVN.dateOnly.
Returns:
- A string representation of the DateTime object in the specified format.
Implementation
String format({
String dateFormat = DateTimeFormatsVN.dateOnly,
}) {
return DateFormat(dateFormat).format(toLocal());
}