date method

DateFormat date ([String pattern, String desiredLocale ])

Return a new date format using the specified pattern. If desiredLocale is not specified, then we default to locale.

Implementation

DateFormat date([String pattern, String desiredLocale]) {
  var actualLocale = (desiredLocale == null) ? locale : desiredLocale;
  return new DateFormat(pattern, actualLocale);
}