@kong-ui-public/i18n 2.0.2-pr.1012.1ad4ee19.0 → 2.0.2-pr.1012.35751374.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ With pluralization:
|
|
|
211
211
|
11 version available
|
|
212
212
|
|
|
213
213
|
With datetime formatting:
|
|
214
|
-
Nov 30, 2023, 11:40
|
|
214
|
+
Nov 30, 2023, 11:40 AM
|
|
215
215
|
Jan 1, 1970, 12:00 AM
|
|
216
216
|
Nov 30, 2023, 11:40 AM
|
|
217
217
|
```
|
|
@@ -399,7 +399,10 @@ This comes for free from FormatJS, and documentation on those methods can be fou
|
|
|
399
399
|
|
|
400
400
|
You can use [ICU Message syntax](https://unicode-org.github.io/icu/userguide/format_parse/messages/) with FormatJS and they have a [description of how you can use this syntax within i18n strings](https://formatjs.io/docs/core-concepts/icu-syntax).
|
|
401
401
|
|
|
402
|
-
This plugin includes an additional `datetime` formatter (examples above) which uses the same `Intl.DateTimeFormatOptions` as the below javascript functions for consistency.
|
|
402
|
+
This plugin includes an additional `datetime` formatter (examples above) which uses the same `Intl.DateTimeFormatOptions` as the below javascript functions for consistency. Date formatting is documented at https://formatjs.io/docs/core-concepts/icu-syntax/#date-type with `datetime` being an additional format element of the argument:
|
|
403
|
+
|
|
404
|
+
- `datetime` format the date as date and time using the same format as `formatIsoDate` e.g. `Sale begins {start, date, datetime}`
|
|
405
|
+
|
|
403
406
|
|
|
404
407
|
Unit tests for I18n wrapper in kong-ui/core also has view examples as a references for those.
|
|
405
408
|
[FormatDate](https://github.com/Kong/shared-ui-components/blob/4a1f99d5cee2d4409f4370a9bce2377450a6429d/packages/core/src/useI18n/i18n.spec.ts#L81)
|