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

Side by Side Diff: pkg/intl/lib/date_format.dart

Issue 14544009: Fix some doc formatting problems, stop using "set" methods for NumberFormat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/lib/number_format.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 part of intl; 5 part of intl;
6 6
7 // TODO(efortuna): Customized pattern system -- suggested by i18n needs 7 // TODO(efortuna): Customized pattern system -- suggested by i18n needs
8 // feedback on appropriateness. 8 // feedback on appropriateness.
9 /** 9 /**
10 * DateFormat is for formatting and parsing dates in a locale-sensitive 10 * DateFormat is for formatting and parsing dates in a locale-sensitive
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 * SECOND s 98 * SECOND s
99 * 99 *
100 * Examples Using the US Locale: 100 * Examples Using the US Locale:
101 * 101 *
102 * Pattern Result 102 * Pattern Result
103 * ---------------- ------- 103 * ---------------- -------
104 * new DateFormat.yMd() -> 07/10/1996 104 * new DateFormat.yMd() -> 07/10/1996
105 * new DateFormat("yMd") -> 07/10/1996 105 * new DateFormat("yMd") -> 07/10/1996
106 * new DateFormat.yMMMMd("en_US") -> July 10, 1996 106 * new DateFormat.yMMMMd("en_US") -> July 10, 1996
107 * new DateFormat("Hm", "en_US") -> 12:08 PM 107 * new DateFormat("Hm", "en_US") -> 12:08 PM
108 * new DateFormat.yMd().Hm() -> 07/10/1996 12:08 PM 108 * new DateFormat.yMd().add_Hm() -> 07/10/1996 12:08 PM
109 * 109 *
110 * Explicit Pattern Syntax: Formats can also be specified with a pattern string. 110 * Explicit Pattern Syntax: Formats can also be specified with a pattern string.
111 * The skeleton forms will resolve to explicit patterns of this form, but will 111 * The skeleton forms will resolve to explicit patterns of this form, but will
112 * also adapt to different patterns in different locales. 112 * also adapt to different patterns in different locales.
113 * The following characters are reserved: 113 * The following characters are reserved:
114 * 114 *
115 * Symbol Meaning Presentation Example 115 * Symbol Meaning Presentation Example
116 * ------ ------- ------------ ------- 116 * ------ ------- ------------ -------
117 * G era designator (Text) AD 117 * G era designator (Text) AD
118 * y year (Number) 1996 118 * y year (Number) 1996
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 _DateFormatField _match(String pattern) { 581 _DateFormatField _match(String pattern) {
582 for (var i = 0; i < _matchers.length; i++) { 582 for (var i = 0; i < _matchers.length; i++) {
583 var regex = _matchers[i]; 583 var regex = _matchers[i];
584 var match = regex.firstMatch(pattern); 584 var match = regex.firstMatch(pattern);
585 if (match != null) { 585 if (match != null) {
586 return _fieldConstructors[i](match.group(0), this); 586 return _fieldConstructors[i](match.group(0), this);
587 } 587 }
588 } 588 }
589 } 589 }
590 } 590 }
OLDNEW
« no previous file with comments | « no previous file | pkg/intl/lib/number_format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698