dateToGitHubIso8601 function
Converts the date
to GitHub's ISO-8601 format:
The format is "YYYY-MM-DDTHH:mm:ssZ"
Implementation
String? dateToGitHubIso8601(DateTime? date) {
if (date == null) {
return null;
}
// Regex removes the milliseconds.
return date.toUtc().toIso8601String().replaceAll(githubDateRemoveRegExp, '');
}