Returns a string representation of this date with the format provided as a parameter.
Example: DateTime.now().format('yyyy-MM-dd') -> 2023-08-24.
DateTime.now().format('yyyy-MM-dd')
2023-08-24
String format(String formatStr) => DateFormat(formatStr).format(this);