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

Unified Diff: README.md

Issue 1232003005: Fix error in example for printing dates, clarify comments in general (Closed) Base URL: https://github.com/dart-lang/intl.git@master
Patch Set: Review fixes Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/intl/date_format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index 2f789a2acbf793aadb450289fdbb2ff90d72b649..ec71975259abf53eb43b82f649755c7704814ed1 100644
--- a/README.md
+++ b/README.md
@@ -39,11 +39,26 @@ the [withLocale][withLocale] operation may be preferable to setting
Intl.withLocale('fr', () => print(myLocalizedMessage());
To specify the locale for an operation you can create a format object in
-a specific locale, or pass in the locale as a parameter to methods.
-
- var format = new DateFormat.yMd("ar");
- var dateString = format.format(new DateTime.now());
- print(myMessage(dateString, locale: 'ar');
+a specific locale, pass in the locale as a parameter to methods, or
+set the default locale.
+
+```dart
+var format = new DateFormat.yMd("ar");
+var dateString = format.format(new DateTime.now());
+```
+
+or
+
+```dart
+print(myMessage(dateString, locale: 'ar');
+```
+
+or
+
+```dart
+Intl.defaultLocale = "es"'
+new DateFormat.jm().format(new DateTime.now());
+```
## Initialization
« no previous file with comments | « no previous file | lib/src/intl/date_format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698