From 91c082ae2605163365349bd56883cc9637889eb9 Mon Sep 17 00:00:00 2001 From: Tal Gruper <110677684+GruperTal@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:25:07 +0200 Subject: [PATCH] Accept "nis" as a name for the shekel NIS (new Israeli shekel) is what most people in Israel type, alongside the ISO code ILS. Co-Authored-By: Claude Opus 5.5 --- core/Calculator.js | 2 +- tests/calculator.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Calculator.js b/core/Calculator.js index 2c94892..4aba176 100644 --- a/core/Calculator.js +++ b/core/Calculator.js @@ -281,7 +281,7 @@ var CURRENCIES = { HUF: { symbol: "", names: ["forint", "forints", "huf"], decimals: 0 }, RON: { symbol: "", names: ["leu", "lei", "romanian leu", "ron"] }, ISK: { symbol: "", names: ["icelandic krona", "isk"], decimals: 0 }, - ILS: { symbol: "₪", names: ["shekel", "shekels", "ils"] }, + ILS: { symbol: "₪", names: ["shekel", "shekels", "nis", "ils"] }, ZAR: { symbol: "", names: ["rand", "south african rand", "zar"] }, THB: { symbol: "", names: ["baht", "thai baht", "thb"] }, MYR: { symbol: "", names: ["ringgit", "myr"] }, diff --git a/tests/calculator.test.js b/tests/calculator.test.js index bde8917..17affb5 100644 --- a/tests/calculator.test.js +++ b/tests/calculator.test.js @@ -80,6 +80,7 @@ test("currencies use the rates and need them only to convert", () => { assert.equal(result("1000 yen to usd"), "$6.32") assert.equal(C.evaluate("10 usd to eur", Object.assign({}, env, { rates: null })), null) assert.equal(result("$30 + 20%", Object.assign({}, env, { rates: null })), "$36.00") + assert.equal(result("10 nis + 5 shekels", Object.assign({}, env, { rates: null })), "₪15.00") }) test("dates and durations", () => {