toShortIso8601String method

String toShortIso8601String()

Returns an ISO 8601 conform datetime string, that omits the microseconds part

Implementation

String toShortIso8601String() {
  return toIso8601String().replaceFirst(RegExp(r'\.\d+'), '');
}