static String tryFormat(DateTime date, intl.DateFormat format) { try { return format.format(date); } catch (e) { // Ignore exception } return ''; }