Skip to content

Commit c14df09

Browse files
authored
Enhance intl.md with enums and fluent API details
Updated the documentation to reflect the introduction of enums and a fluent API for type-safe option creation.
1 parent 404bdba commit c14df09

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/intl.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
Elemento supports most of the classes from the [
44
Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) JavaScript API.
55

6-
In addition to the actual mappings, Elemento implements the builder pattern using enums to create the options easily and in a
7-
type-safe manner. Here are some examples:
6+
In addition to the actual mappings, Elemento introduces enums, implements the builder pattern, and a fluent
7+
API to create the options in a type-safe manner. Here are some examples (most of them following the MDN
8+
examples):
89

910
## Date and Time Formatting
1011

1112
```java
1213
var date = new JsDate(2020, 11, 20, 3, 23, 16, 738);
1314

1415
// Specify default date formatting for language (locale)
15-
console.log(new DateTimeFormat("en-US").format(new JsDate()));
16+
console.log(new DateTimeFormat("en-US").format(date));
1617
// Expected output: "12/20/2020"
1718

1819
// Specify date and time format using "style" options (i.e. full, long, medium, short)

0 commit comments

Comments
 (0)