Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: pkg/intl/example/basic/basic_example.dart

Issue 143453011: pkg/intl: dartfmt (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/intl/example/basic/basic_example_runner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This provides a basic example of internationalization usage. It uses the 6 * This provides a basic example of internationalization usage. It uses the
7 * local variant of all the facilities, meaning that libraries with the 7 * local variant of all the facilities, meaning that libraries with the
8 * data for all the locales are directly imported by the program. Once lazy 8 * data for all the locales are directly imported by the program. Once lazy
9 * loading is available, we expect this to be the preferred mode, with 9 * loading is available, we expect this to be the preferred mode, with
10 * the initialization code actually loading the specific libraries needed. 10 * the initialization code actually loading the specific libraries needed.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Example making use of the return value from withLocale; 62 // Example making use of the return value from withLocale;
63 var returnValue = Intl.withLocale(th.locale, () => runAt('now', 'today')); 63 var returnValue = Intl.withLocale(th.locale, () => runAt('now', 'today'));
64 doThisWithTheOutput(returnValue); 64 doThisWithTheOutput(returnValue);
65 } 65 }
66 66
67 printForLocale(aDate, intl, operation) { 67 printForLocale(aDate, intl, operation) {
68 var hmsFormat = intl.date().add_Hms(); 68 var hmsFormat = intl.date().add_Hms();
69 var dayFormat = intl.date().add_yMMMMEEEEd(); 69 var dayFormat = intl.date().add_yMMMMEEEEd();
70 var time = hmsFormat.format(aDate); 70 var time = hmsFormat.format(aDate);
71 var day = dayFormat.format(aDate); 71 var day = dayFormat.format(aDate);
72 Intl.withLocale(intl.locale, () => doThisWithTheOutput(operation(time,day))); 72 Intl.withLocale(intl.locale, () => doThisWithTheOutput(operation(time, day)));
73 } 73 }
OLDNEW
« no previous file with comments | « no previous file | pkg/intl/example/basic/basic_example_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698