Skip to content

Commit

Permalink
intl: Remove new from dartdoc comments
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 309989179
  • Loading branch information
Dart Team authored and jamesderlin committed May 28, 2020
1 parent 99864ba commit 49a1f81
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions pkgs/intl/lib/intl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ part 'src/intl/number_format.dart';
/// args: [date],
/// desc: 'Indicate the current date',
/// examples: const {'date' : 'June 8, 2012'});
/// print(today(new DateTime.now().toString());
/// print(today(DateTime.now().toString());
///
/// howManyPeople(numberOfPeople, place) => Intl.plural(numberOfPeople,
/// zero: 'I see no one at all in $place.',
Expand All @@ -75,7 +75,7 @@ part 'src/intl/number_format.dart';
///
/// To temporarily use a locale other than the default, use the `withLocale`
/// function.
/// var todayString = new DateFormat('pt_BR').format(new DateTime.now());
/// var todayString = DateFormat('pt_BR').format(DateTime.now());
/// print(withLocale('pt_BR', () => today(todayString));
///
/// See `tests/message_format_test.dart` for more examples.
Expand Down Expand Up @@ -566,7 +566,7 @@ class Intl {
///
/// For example
///
/// Intl.withLocale('fr', () => new NumberFormat.format(123456));
/// Intl.withLocale('fr', () => NumberFormat.format(123456));
///
/// or
///
Expand All @@ -575,7 +575,7 @@ class Intl {
/// name: 'hello',
/// args: [name],
/// desc: 'Say Hello');
/// Intl.withLocale('zh', new Timer(new Duration(milliseconds:10),
/// Intl.withLocale('zh', Timer(Duration(milliseconds:10),
/// () => print(hello('World')));
static dynamic withLocale<T>(String locale, T Function() function) {
// TODO(alanknight): Make this return T. This requires work because T might
Expand Down
4 changes: 2 additions & 2 deletions pkgs/intl/lib/src/intl/compact_number_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class _CompactStyleWithNegative extends _CompactStyleBase {
/// 4: '00K'
/// which matches
///
/// new _CompactStyle(pattern: '00K', normalizedExponent: 4, divisor: 1000,
/// expectedDigits: 1, prefix: '', suffix: 'K');
/// _CompactStyle(pattern: '00K', normalizedExponent: 4, divisor: 1000,
/// expectedDigits: 1, prefix: '', suffix: 'K');
///
/// where expectedDigits is the number of zeros.
class _CompactStyle extends _CompactStyleBase {
Expand Down
36 changes: 18 additions & 18 deletions pkgs/intl/lib/src/intl/date_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ part of intl;
/// initialization. e.g.
///
/// ```dart
/// print(new DateFormat.yMMMd().format(new DateTime.now()));
/// print(DateFormat.yMMMd().format(DateTime.now()));
/// ```
///
/// But for other locales, the formatting data for the locale must be
Expand Down Expand Up @@ -120,12 +120,12 @@ part of intl;
///
/// Pattern Result
/// ---------------- -------
/// new DateFormat.yMd() -> 7/10/1996
/// new DateFormat('yMd') -> 7/10/1996
/// new DateFormat.yMMMMd('en_US') -> July 10, 1996
/// new DateFormat.jm() -> 5:08 PM
/// new DateFormat.yMd().add_jm() -> 7/10/1996 5:08 PM
/// new DateFormat.Hm() -> 17:08 // force 24 hour time
/// DateFormat.yMd() -> 7/10/1996
/// DateFormat('yMd') -> 7/10/1996
/// DateFormat.yMMMMd('en_US') -> July 10, 1996
/// DateFormat.jm() -> 5:08 PM
/// DateFormat.yMd().add_jm() -> 7/10/1996 5:08 PM
/// DateFormat.Hm() -> 17:08 // force 24 hour time
///
/// Explicit Pattern Syntax: Formats can also be specified with a pattern
/// string. This can be used for formats that don't have a skeleton available,
Expand Down Expand Up @@ -224,13 +224,13 @@ class DateFormat {
/// For example, in an en_US locale, specifying the skeleton
///
/// ```dart
/// new DateFormat.yMEd();
/// DateFormat.yMEd();
/// ```
///
/// or the explicit
///
/// ```dart
/// new DateFormat('EEE, M/d/y');
/// DateFormat('EEE, M/d/y');
/// ```
///
/// would produce the same result, a date of the form 'Wed, 6/27/2012'.
Expand Down Expand Up @@ -319,14 +319,14 @@ class DateFormat {
///
/// For example, this will accept
///
/// new DateFormat.yMMMd('en_US').parseLoose('SEp 3 2014');
/// new DateFormat.yMd('en_US').parseLoose('09 03/2014');
/// new DateFormat.yMd('en_US').parseLoose('09 / 03 / 2014');
/// DateFormat.yMMMd('en_US').parseLoose('SEp 3 2014');
/// DateFormat.yMd('en_US').parseLoose('09 03/2014');
/// DateFormat.yMd('en_US').parseLoose('09 / 03 / 2014');
///
/// It will NOT accept
///
/// // 'Sept' is not a valid month name.
/// new DateFormat.yMMMd('en_US').parseLoose('Sept 3, 2014');
/// // 'Sept' is not a valid month name.
/// DateFormat.yMMMd('en_US').parseLoose('Sept 3, 2014');
DateTime parseLoose(String inputString, [bool utc = false]) {
try {
return _parse(inputString, utc: utc, strict: true);
Expand Down Expand Up @@ -418,20 +418,20 @@ class DateFormat {
/// So,
///
/// ```dart
/// new DateFormat.yMd('en_US')
/// DateFormat.yMd('en_US')
/// ```
///
/// is equivalent to
///
/// ```dart
/// new DateFormat('yMd', 'en_US')
/// DateFormat('yMd', 'en_US')
/// ```
///
/// To create a compound format you can use these constructors in combination
/// with the 'add_*' methods below. e.g.
///
/// ```dart
/// new DateFormat.yMd().add_Hms();
/// DateFormat.yMd().add_Hms();
/// ```
///
/// If the optional [locale] is omitted, the format will be created using the
Expand Down Expand Up @@ -483,7 +483,7 @@ class DateFormat {
/// useful for creating compound formats. For example
///
/// ```dart
/// new DateFormat.yMd().add_Hms();
/// DateFormat.yMd().add_Hms();
/// ```
///
/// would create a date format that prints both the date and the time.
Expand Down
34 changes: 17 additions & 17 deletions pkgs/intl/lib/src/intl/number_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef _PatternGetter = String Function(NumberSymbols);
///
/// For example,
///
/// var f = new NumberFormat("###.0#", "en_US");
/// var f = NumberFormat("###.0#", "en_US");
/// print(f.format(12.345));
/// ==> 12.34
///
Expand All @@ -41,8 +41,8 @@ typedef _PatternGetter = String Function(NumberSymbols);
/// There are also standard patterns available via the special constructors.
/// e.g.
///
/// var percent = new NumberFormat.percentPattern("ar"); var
/// eurosInUSFormat = new NumberFormat.currency(locale: "en_US",
/// var percent = NumberFormat.percentPattern("ar"); var
/// eurosInUSFormat = NumberFormat.currency(locale: "en_US",
/// symbol: "€");
///
/// There are several such constructors available, though some of them are
Expand Down Expand Up @@ -142,12 +142,12 @@ class NumberFormat {
/// otherwise we use the value from the pattern for the locale.
///
/// So, for example,
/// new NumberFormat.currency(name: 'USD', decimalDigits: 7)
/// NumberFormat.currency(name: 'USD', decimalDigits: 7)
/// will format with 7 decimal digits, because that's what we asked for. But
/// new NumberFormat.currency(locale: 'en_US', name: 'JPY')
/// NumberFormat.currency(locale: 'en_US', name: 'JPY')
/// will format with zero, because that's the default for JPY, and the
/// currency's default takes priority over the locale's default.
/// new NumberFormat.currency(locale: 'en_US')
/// NumberFormat.currency(locale: 'en_US')
/// will format with two, which is the default for that locale.
///
int get decimalDigits => _decimalDigits;
Expand Down Expand Up @@ -203,8 +203,8 @@ class NumberFormat {
///
/// If provided,
/// use [currencyNameOrSymbol] in place of the default currency name. e.g.
/// var eurosInCurrentLocale = new NumberFormat
/// .currencyPattern(Intl.defaultLocale, "€");
/// var eurosInCurrentLocale = NumberFormat
/// .currencyPattern(Intl.defaultLocale, "€");
@Deprecated('Use NumberFormat.currency')
factory NumberFormat.currencyPattern(
[String locale, String currencyNameOrSymbol]) {
Expand All @@ -226,28 +226,28 @@ class NumberFormat {
/// Otherwise we will use the default currency name for the current locale. If
/// no [symbol] is specified, we will use the currency name in the formatted
/// result. e.g.
/// var f = new NumberFormat.currency(locale: 'en_US', name: 'EUR')
/// var f = NumberFormat.currency(locale: 'en_US', name: 'EUR')
/// will format currency like "EUR1.23". If we did not specify the name, it
/// would format like "USD1.23".
///
/// If [symbol] is used, then that symbol will be used in formatting instead
/// of the name. e.g.
/// var eurosInCurrentLocale = new NumberFormat.currency(symbol: "€");
/// var eurosInCurrentLocale = NumberFormat.currency(symbol: "€");
/// will format like "€1.23". Otherwise it will use the currency name.
/// If this is not explicitly specified in the constructor, then for
/// currencies we use the default value for the currency if the name is given,
/// otherwise we use the value from the pattern for the locale.
/// otherwise we use the value from the pattern for the locale.
///
/// If [decimalDigits] is specified, numbers will format with that many digits
/// after the decimal place. If it's not, they will use the default for the
/// currency in [name], and the default currency for [locale] if the currency
/// name is not specified. e.g.
/// new NumberFormat.currency(name: 'USD', decimalDigits: 7)
/// NumberFormat.currency(name: 'USD', decimalDigits: 7)
/// will format with 7 decimal digits, because that's what we asked for. But
/// new NumberFormat.currency(locale: 'en_US', name: 'JPY')
/// NumberFormat.currency(locale: 'en_US', name: 'JPY')
/// will format with zero, because that's the default for JPY, and the
/// currency's default takes priority over the locale's default.
/// new NumberFormat.currency(locale: 'en_US')
/// NumberFormat.currency(locale: 'en_US')
/// will format with two, which is the default for that locale.
///
/// The [customPattern] parameter can be used to specify a particular
Expand Down Expand Up @@ -282,12 +282,12 @@ class NumberFormat {
/// after the decimal place. If it's not, they will use the default for the
/// currency in [name], and the default currency for [locale] if the currency
/// name is not specified. e.g.
/// new NumberFormat.simpleCurrency(name: 'USD', decimalDigits: 7)
/// NumberFormat.simpleCurrency(name: 'USD', decimalDigits: 7)
/// will format with 7 decimal digits, because that's what we asked for. But
/// new NumberFormat.simpleCurrency(locale: 'en_US', name: 'JPY')
/// NumberFormat.simpleCurrency(locale: 'en_US', name: 'JPY')
/// will format with zero, because that's the default for JPY, and the
/// currency's default takes priority over the locale's default.
/// new NumberFormat.simpleCurrency(locale: 'en_US')
/// NumberFormat.simpleCurrency(locale: 'en_US')
/// will format with two, which is the default for that locale.
factory NumberFormat.simpleCurrency(
{String locale, String name, int decimalDigits}) {
Expand Down

0 comments on commit 49a1f81

Please sign in to comment.