@hebcal/core 4.1.0 → 4.2.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 CHANGED
@@ -142,6 +142,12 @@ parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53]
142
142
  <p>When specifying years of the Hebrew calendar in the present millennium,
143
143
  we omit the thousands (which is presently 5 [ה]).</p>
144
144
  </dd>
145
+ <dt><a href="#gematriyaStrToNum">gematriyaStrToNum(str)</a> ⇒ <code>number</code></dt>
146
+ <dd><p>Converts a string of Hebrew letters to a numerical value.</p>
147
+ <p>Only considers the value of Hebrew letters <code>א</code> through <code>ת</code>.
148
+ Ignores final Hebrew letters such as <code>ך</code> (kaf sofit) or <code>ם</code> (mem sofit)
149
+ and vowels (nekudot).</p>
150
+ </dd>
145
151
  </dl>
146
152
 
147
153
  ## Typedefs
@@ -175,6 +181,8 @@ holidays. `@hebcal/core` supports four locales by default
175
181
  * [.lookupTranslation(id, [locale])](#Locale.lookupTranslation) ⇒ <code>string</code>
176
182
  * [.gettext(id, [locale])](#Locale.gettext) ⇒ <code>string</code>
177
183
  * [.addLocale(locale, data)](#Locale.addLocale)
184
+ * [.addTranslation(locale, id, translation)](#Locale.addTranslation)
185
+ * [.addTranslations(locale, data)](#Locale.addTranslations)
178
186
  * [.useLocale(locale)](#Locale.useLocale) ⇒ <code>LocaleData</code>
179
187
  * [.getLocaleName()](#Locale.getLocaleName) ⇒ <code>string</code>
180
188
  * [.getLocaleNames()](#Locale.getLocaleNames) ⇒ <code>Array.&lt;string&gt;</code>
@@ -218,6 +226,31 @@ Register locale translations.
218
226
  | locale | <code>string</code> | Locale name (i.e.: `'he'`, `'fr'`) |
219
227
  | data | <code>LocaleData</code> | parsed data from a `.po` file. |
220
228
 
229
+ <a name="Locale.addTranslation"></a>
230
+
231
+ ### Locale.addTranslation(locale, id, translation)
232
+ Adds a translation to `locale`, replacing any previous translation.
233
+
234
+ **Kind**: static method of [<code>Locale</code>](#Locale)
235
+
236
+ | Param | Type | Description |
237
+ | --- | --- | --- |
238
+ | locale | <code>string</code> | Locale name (i.e: `'he'`, `'fr'`). |
239
+ | id | <code>string</code> | Message ID to translate |
240
+ | translation | <code>string</code> | Translation text |
241
+
242
+ <a name="Locale.addTranslations"></a>
243
+
244
+ ### Locale.addTranslations(locale, data)
245
+ Adds multiple translations to `locale`, replacing any previous translations.
246
+
247
+ **Kind**: static method of [<code>Locale</code>](#Locale)
248
+
249
+ | Param | Type | Description |
250
+ | --- | --- | --- |
251
+ | locale | <code>string</code> | Locale name (i.e: `'he'`, `'fr'`). |
252
+ | data | <code>LocaleData</code> | parsed data from a `.po` file. |
253
+
221
254
  <a name="Locale.useLocale"></a>
222
255
 
223
256
  ### Locale.useLocale(locale) ⇒ <code>LocaleData</code>
@@ -2692,6 +2725,21 @@ gematriya(60) // 'ס׳'
2692
2725
  gematriya(3761) // 'ג׳תשס״א'
2693
2726
  gematriya(1123) // 'א׳קכ״ג'
2694
2727
  ```
2728
+ <a name="gematriyaStrToNum"></a>
2729
+
2730
+ ## gematriyaStrToNum(str) ⇒ <code>number</code>
2731
+ Converts a string of Hebrew letters to a numerical value.
2732
+
2733
+ Only considers the value of Hebrew letters `א` through `ת`.
2734
+ Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
2735
+ and vowels (nekudot).
2736
+
2737
+ **Kind**: global function
2738
+
2739
+ | Param | Type |
2740
+ | --- | --- |
2741
+ | str | <code>string</code> |
2742
+
2695
2743
  <a name="ZmanimTimesResult"></a>
2696
2744
 
2697
2745
  ## ZmanimTimesResult : <code>Object</code>