Source
String transform(dynamic value, [String pattern = "mediumDate"]) { if (value == null) return null; if (!this.supports(value)) { throw new InvalidPipeArgumentException(DatePipe, value); } if (value is num) { value = new DateTime.fromMillisecondsSinceEpoch(value, isUtc: true); } if (DatePipe._ALIASES.containsKey(pattern)) { pattern = DatePipe._ALIASES[pattern]; } return DateFormatter.format(value, defaultLocale, pattern); }