initializeDateFormatting function

Future initializeDateFormatting (String locale, String url)

This should be called for at least one locale before any date formatting methods are called. It sets up the lookup for date symbols using url. The url parameter should end with a "/". For example, "http://localhost:8000/dates/"


Future initializeDateFormatting(String locale, String url) {
  var reader = new HttpRequestDataReader('${url}symbols/');
  initializeDateSymbols(() => new LazyLocaleData(
      reader, _createDateSymbol, availableLocalesForDateFormatting));
  var reader2 = new HttpRequestDataReader('${url}patterns/');
  initializeDatePatterns(() =>
      new LazyLocaleData(reader2, (x) => x, availableLocalesForDateFormatting));
  var actualLocale = Intl.verifiedLocale(
      locale, (l) => availableLocalesForDateFormatting.contains(l));
  return initializeIndividualLocaleDateFormatting((symbols, patterns) {
    return Future.wait(<Future>[