toDateWithDay property
String
get
toDateWithDay
Returns date in format "Monday, Jan 15"
Implementation
String get toDateWithDay {
final localTime = toLocal();
final days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
final months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
final day = days[localTime.weekday - 1];
final month = months[localTime.month - 1];
return '$day, $month ${localTime.day}';
}