11 lines
227 B
Dart
11 lines
227 B
Dart
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
/// Retrieves the current date in the format "yyyy-MM-dd".
|
|
///
|
|
/// @return [String] A formatted date.
|
|
String getCurrentDate(DateTime date) {
|
|
return DateFormat("yyyy-MM-dd").format(date);
|
|
}
|