toShort property
String
get
toShort
Implementation
String get toShort {
final dt = this;
/// Returns a string of "yyyy-MM-dd" or "HH:mm:ss"
final now = DateTime.now();
if (dt.year == now.year && dt.month == now.month && dt.day == now.day) {
return DateFormat.jm().format(dt);
} else {
return DateFormat('yy.MM.dd').format(dt);
}
}