flutter/packages/flutter_tools/lib
Tae Hyung Kim ff838bca89
Add locale-specific DateTime formatting syntax (#129573)
Based on the [message format
syntax](https://unicode-org.github.io/icu/userguide/format_parse/messages/#examples)
for
[ICU4J](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html).
This adds new syntax to the current Flutter messageFormat parser which
should allow developers to add locale-specific date formatting.

## Usage example
```
  "datetimeTest": "Today is {today, date, ::yMd}",
  "@datetimeTest": {
    "placeholders": {
      "today": {
        "description": "The date placeholder",
        "type": "DateTime"
      }
    }
  }
```
compiles to
```
  String datetimeTest(DateTime today) {
    String _temp0 = intl.DateFormat.yMd(localeName).format(today);
    return 'Today is $_temp0';
  }
```

Fixes https://github.com/flutter/flutter/issues/127304.
2023-06-29 09:23:34 -07:00
..
src Add locale-specific DateTime formatting syntax (#129573) 2023-06-29 09:23:34 -07:00
executable.dart [flutter_tools] delete flutter format command (#129360) 2023-06-22 21:28:55 +00:00
runner.dart Clearer text about what happens with --disable-telemetry + enable-telemetry command (#125995) 2023-05-08 13:01:25 +00:00