{"_id":"@alexbald/nativescript-intl","_rev":"1-137e6530ba8d247c0bb918ee56406637","name":"@alexbald/nativescript-intl","dist-tags":{"latest":"4.0.2"},"versions":{"4.0.2":{"name":"@alexbald/nativescript-intl","version":"4.0.2","description":"Provides API for using Native date, time and number formatting with an API similar to Intl.js","nativescript":{"platforms":{"android":"8.0.0","ios":"6.5.4"}},"keywords":["NativeScript","localization","globalization","formatting","currency","nativescript-angular"],"author":{"name":"Alex"},"gitHead":"99bd2bd30cd9c918b8b0f75af8c79458a0a12c7c","_id":"@alexbald/nativescript-intl@4.0.2","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-9/WdqeP8GS1A/yvBT/iXYvfZqChuy8G/d+2q32CfFfYyNr5Xini+Kb7XUBgUyF/ioFivcsiNR5J8Jb5KpgYBIA==","shasum":"f181167e77ca28884eb774474fda9bc9f1f40889","tarball":"https://registry.npmjs.org/@alexbald/nativescript-intl/-/nativescript-intl-4.0.2.tgz","fileCount":10,"unpackedSize":23018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDOQrCRA9TVsSAnZWagAAmCQP/1/S0uMaZhj7I/S2vD4n\nT+MgVmDa4hDScf9jFDEtBh/HVWw1jf26bytMfRQPH9O0HWLOZhkNkn9HVEAc\nT7rGqA3mVlb5cuCY5w/fh0lE9J/IaJqbNpVp//AuEEfOBnuCeBTNtyruK7SN\nj/+W8YKZcaTpV+h/6YaCeD/4tfq+IeO+rnDr6ILLPrVpCCycxmC3NYKVdzwg\nq/muQfdMocmSaau0de8hXKLcV+yZgRI7fYYK7VruAum+RfLaJTX2KeMxwsSd\nz+ZHzCetHm7ZInds5cFQyQcIpJE134myaHwFSnrskYqHRNnPJwWgkieCv2tr\nG1mINVnok5sm8HUQlkgg4nUHcND4+NXenFC/+5T1yeRgobAInsOeK7JJZBy7\nDAmU2CjL22zUf/nFzg0d16mJOLa0TFguQrl7GNebcMXAerMOelVpXx0lSog5\nu8GKyPcA3FDHtK+xJD1hGRX8IyoMORZxcTHtlRv9w3UNyOYsEohZV0FxjpWn\nBWY0omXe8yi8lrbcJShnyG+6N9OvtwEhALFFUSptIcmWN8o/h4tXHcXt/KAx\nEoc5dHVmmFGGvcX3ouOPf/v9jxgVDMrKkDDknezEM4dNqp2f60z0ohElnoTE\n/yKMd/bHcq0S9TUmmQWsa8RnIB+IhfERn6MVKqz42OLE8cGp3lgIdEBTP1yY\nPnC7\r\n=Y8Pg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/jC29Z1ut4ZKsSKJvbGaz0fY6X6lJtCg5vq/sYg/AgAiEAy2TR63wmyWSod1CDFk7r62riUcqYMZi61GoNjmMLACw="}]},"_npmUser":{"name":"alexbald","email":"alexanderbaldacchino@gmail.com"},"directories":{},"maintainers":[{"name":"alexbald","email":"alexanderbaldacchino@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-intl_4.0.2_1645012011792_0.08101317673196329"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-16T11:46:51.684Z","4.0.2":"2022-02-16T11:46:51.925Z","modified":"2022-04-04T12:39:20.939Z"},"maintainers":[{"name":"alexbald","email":"alexanderbaldacchino@gmail.com"}],"description":"Provides API for using Native date, time and number formatting with an API similar to Intl.js","keywords":["NativeScript","localization","globalization","formatting","currency","nativescript-angular"],"author":{"name":"Alex"},"readme":"Welcome to the `nativescript-intl` plugin for NativeScript framework \n\n# Prerequisites\n\n- installed [NativeScript](https://github.com/NativeScript/NativeScript)\n- installed [NativeScript-CLI](https://github.com/NativeScript/nativescript-cli)\n\n# Install `nativescript-intl` plugin.\n\nNavigate to project folder and run `NativeScript-CLI` command `tns plugin add nativescript-intl`.\n\nThis plugin provides similar to [Intl.js](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl) API for date, time and number formatting on a mobile device (Android and iOS).\n\n## How to use\n\n```JavaScript\nvar intl = require(\"nativescript-intl\");\nvar dateFormat = new intl.DateTimeFormat('en-US', {'year': 'numeric', 'month': 'short', 'day': 'numeric'}).format(new Date(2016, 2, 23));\nvar numberFormat = new intl.NumberFormat('en-US', {'style': 'currency', 'currency': 'USD', 'currencyDisplay': 'symbol'}).format(123456.789);\n\nconsole.log(\"dateFormat: \" + dateFormat);\nconsole.log(\"numberFormat: \" + numberFormat);\n// prints Mar 23, 2016\n// $123456.79\n```\n\nSince localization formatting is not exactly same on Android, iOS and [Intl.js](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl) there is another option to use this API.\n\n## Custom pattern\n\n```JavaScript\nvar intl = require(\"nativescript-intl\");\nvar dateFormat = new intl.DateTimeFormat(null, null, 'y MMMM d, EEEE HH:mm:ss').format(new Date(2016, 2, 23, 12, 35, 40));\nvar numberFormat = new intl.NumberFormat('en-US', {'style': 'currency', 'currency': 'USD', 'currencyDisplay': 'symbol'}, '#,##0.00 ¤').format(123456.789);\n\nconsole.log(\"dateFormat: \" + dateFormat);\nconsole.log(\"numberFormat: \" + numberFormat);\n// prints 2016 March 23, Wednesday 2016 12:35:40\n// 123,456.79 $\n```\n\n> Omitting locale will use the current locale setting on device.\n\n> Keep in mind that ICU versions differ accross device OS versions, so this plugin could produce different results on a different API level (Android) and OS version (iOS).\n","readmeFilename":"README.md"}