@kong-ui-public/i18n 0.6.2-pr.616.16d5544.0 → 0.6.2-pr.616.b4ff420.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.
Files changed (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,8 @@
12
12
  - [HTML safe formatting with `<i18n-t>`](#html-safe-formatting-with-i18n-t)
13
13
  - [Formatting numbers, dates and times](#formatting-numbers-dates-and-times)
14
14
  - [Additional service functions.](#additional-service-functions)
15
+ - [format-unix-time-stamp](#format-unix-time-stamp)
16
+ - [format-iso-date](#format-iso-date)
15
17
  - [te](#te)
16
18
  - [tm](#tm)
17
19
 
@@ -395,6 +397,42 @@ Every single method listed in [FormatJS](https://formatjs.io/docs/intl) is expos
395
397
 
396
398
  (as previously exposed by vue18n-n)
397
399
 
400
+ ### format-unix-time-stamp
401
+
402
+ Formats a unix timestamp into a formatted date string
403
+
404
+ `code:`
405
+
406
+ ```ts
407
+ const { formatUnixTimeStamp } = useI18n()
408
+ console.log(formatUnixTimeStamp('1558006979'))
409
+ console.log()
410
+ ```
411
+
412
+ `result:`
413
+
414
+ ```json
415
+ May 16, 2019, 11:42 AM
416
+ ```
417
+
418
+ ### format-iso-date
419
+
420
+ Format an ISO formatted date
421
+
422
+ `code:`
423
+
424
+ ```ts
425
+ const { formatIsoDate } = useI18n()
426
+ console.log(formatIsoDate('2019-05-16T11:42:59.000Z'))
427
+ console.log()
428
+ ```
429
+
430
+ `result:`
431
+
432
+ ```json
433
+ May 16, 2019, 11:42 AM
434
+ ```
435
+
398
436
  ### te
399
437
 
400
438
  check if translation message exists
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/i18n",
3
- "version": "0.6.2-pr.616.16d5544.0",
3
+ "version": "0.6.2-pr.616.b4ff420.0",
4
4
  "type": "module",
5
5
  "main": "./dist/i18n.umd.js",
6
6
  "module": "./dist/i18n.es.js",