From 30b3181cd6baa4ce2c7866a0979544e985e5ce26 Mon Sep 17 00:00:00 2001 From: Igor Losev Date: Fri, 12 May 2023 11:07:57 +0200 Subject: [PATCH] Added AUD and GBP to the Currency enumeration --- .releases/4.27.0.md | 4 ++++ lang/Currency.js | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .releases/4.27.0.md diff --git a/.releases/4.27.0.md b/.releases/4.27.0.md new file mode 100644 index 0000000..65954e1 --- /dev/null +++ b/.releases/4.27.0.md @@ -0,0 +1,4 @@ +**New Features** + +* Added an `Australian Dollar` to the `Currency` enumeration. +* Added a `British Pound` to the `Currency` enumeration. diff --git a/lang/Currency.js b/lang/Currency.js index 5b11314..85df17a 100644 --- a/lang/Currency.js +++ b/lang/Currency.js @@ -59,6 +59,16 @@ module.exports = (() => { return Enum.fromCode(Currency, code); } + /** + * The Australian Dollar. + * + * @return {Currency} + * @constructor + */ + static get AUD() { + return aud; + } + /** * The Canadian Dollar. * @@ -79,6 +89,16 @@ module.exports = (() => { return eur; } + /** + * The British Pound. + * + * @public + * @returns {Currency} + */ + static get GBP() { + return gbp; + } + /** * The Hong Kong Dollar. * @@ -114,8 +134,10 @@ module.exports = (() => { } } + const aud = new Currency('AUD', 'Australian Dollar', 2, 'AUD$'); const cad = new Currency('CAD', 'Canadian Dollar', 2, 'CAD$'); const eur = new Currency('EUR', 'Euro', 2, 'EUR'); + const gbp = new Currency('GBP', 'British Pound', 2, 'GBP'); const hkd = new Currency('HKD', 'Hong Kong Dollar', 2, 'HK$'); const jpy = new Currency('JPY', 'Japanese Yen', 2, 'JPY'); const usd = new Currency('USD', 'US Dollar', 2, 'US$');