parseAndFormatTimestamp function
- String timestamp
Helper function to parse a string timestamp to human readable format i.e. 2025-06-05T12:33:32 will be readable as 5th June 2025, 12:33 PM
timestamp - String timestamp in ISO 8601 format
Returns a human readable string in the format of 5th June 2025, 12:33 PM
Implementation
String parseAndFormatTimestamp(String timestamp) {
final dateTime = DateTime.parse(timestamp);
return formatTimestamp(dateTime);
}