tt_AsISO function

dynamic tt_AsISO(
  1. dynamic value
)

tt_AsISO(v): ISO 8601 date string

Implementation

dynamic tt_AsISO(dynamic value) {
  final dt = _vToDateTime(value);
  if (dt == null) return '';
  // @@@ this used to truncate to 10 characters, keeping only the date and
  //     cutting off the time entirely -- the function's own documentation
  //     specifies the format as 'YYYY-MM-DDTHH:MM:SS' (19 characters),
  //     not a plain date.
  return dt.toIso8601String().substring(0, 19);
}