Skip to content

Commit 84bb56b

Browse files
committed
Return StringArrayMap on Locale.useLocale for compatibility with previous
1 parent 6e3f642 commit 84bb56b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hebcal/hdate",
3-
"version": "0.9.8",
3+
"version": "0.9.9",
44
"description": "converts between Hebrew and Gregorian dates using Rata Die (R.D.) algorithm by Dershowitz and Reingold",
55
"author": "Michael J. Radwin (https://github.com/mjradwin)",
66
"contributors": [

src/locale.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ export class Locale {
145145
* will be represented by the corresponding translation in the specified locale.
146146
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
147147
*/
148-
static useLocale(locale: string): void {
148+
static useLocale(locale: string): StringArrayMap {
149149
const locale0 = locale.toLowerCase();
150150
const obj = locales.get(locale0);
151151
if (!obj) {
152152
throw new RangeError(`Locale '${locale}' not found`);
153153
}
154154
activeName = alias[locale0] || locale0;
155155
activeLocale = obj;
156+
return activeLocale;
156157
}
157158

158159
/**

0 commit comments

Comments
 (0)