Skip to content

Commit 5df5905

Browse files
committed
Fix nekudot for 11 and 12 in Omer count
1 parent c72cb42 commit 5df5905

File tree

4 files changed

+63
-34
lines changed

4 files changed

+63
-34
lines changed

package-lock.json

+50-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hebcal/hdate",
3-
"version": "0.9.2",
3+
"version": "0.9.3",
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": [
@@ -38,9 +38,9 @@
3838
"lint": "gts lint"
3939
},
4040
"devDependencies": {
41-
"@ava/typescript": "^4.1.0",
42-
"@types/node": "20.12.7",
43-
"ava": "^6.1.2",
41+
"@ava/typescript": "^5.0.0",
42+
"@types/node": "20.12.10",
43+
"ava": "^6.1.3",
4444
"gts": "^5.3.0",
4545
"typescript": "^5.4.5"
4646
}

src/omer.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,18 @@ const shneiYamim = shnei + ' ' + yamim;
144144
const shavuot = 'שָׁבוּעוֹת';
145145
const yom = 'יוֹם';
146146
const yomEchad = yom + ' ' + ones[1];
147+
const asar = 'עָשָׂר';
147148

148149
function omerTodayIsHe(omerDay: number): string {
149150
const ten: number = Math.floor(omerDay / 10);
150151
const one: number = omerDay % 10;
151152
let str = 'הַיּוֹם ';
152-
if (10 < omerDay && omerDay < 20) {
153-
str += ones[one] + ' עָשָׂר';
153+
if (omerDay === 11) {
154+
str += 'אַחַד ' + asar;
155+
} else if (omerDay === 12) {
156+
str += 'שְׁנֵים ' + asar;
157+
} else if (12 < omerDay && omerDay < 20) {
158+
str += ones[one] + ' ' + asar;
154159
} else if (omerDay > 9) {
155160
str += ones[one];
156161
if (one) {

test/omer.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ test('omerTodayIsHe', t => {
5656
'הַיּוֹם שְׁמוֹנָה יָמִים, שְׁהֵם שָׁבֽוּעַ אֶחָד וְיוֹם אֶחָד לָעֽוֹמֶר',
5757
'הַיּוֹם תִּשְׁעָה יָמִים, שְׁהֵם שָׁבֽוּעַ אֶחָד וּשְׁנֵי יָמִים לָעֽוֹמֶר',
5858
'הַיּוֹם עֲשָׂרָה יָמִים, שְׁהֵם שָׁבֽוּעַ אֶחָד וּשְׁלוֹשָׁה יָמִים לָעֽוֹמֶר',
59-
'הַיּוֹם אֶחָד עָשָׂר יוֹם, שְׁהֵם שָׁבֽוּעַ אֶחָד וְאַרְבָּעָה יָמִים לָעֽוֹמֶר',
60-
'הַיּוֹם שְׁנַיִם עָשָׂר יוֹם, שְׁהֵם שָׁבֽוּעַ אֶחָד וַחֲמִשָּׁה יָמִים לָעֽוֹמֶר',
59+
'הַיּוֹם אַחַד עָשָׂר יוֹם, שְׁהֵם שָׁבֽוּעַ אֶחָד וְאַרְבָּעָה יָמִים לָעֽוֹמֶר',
60+
'הַיּוֹם שְׁנֵים עָשָׂר יוֹם, שְׁהֵם שָׁבֽוּעַ אֶחָד וַחֲמִשָּׁה יָמִים לָעֽוֹמֶר',
6161
'הַיּוֹם שְׁלוֹשָׁה עָשָׂר יוֹם, שְׁהֵם שָׁבֽוּעַ אֶחָד וְשִׁשָּׁה יָמִים לָעֽוֹמֶר',
6262
'הַיּוֹם אַרְבָּעָה עָשָׂר יוֹם, שְׁהֵם שְׁנֵי שָׁבוּעוֹת לָעֽוֹמֶר',
6363
'הַיּוֹם חֲמִשָּׁה עָשָׂר יוֹם, שְׁהֵם שְׁנֵי שָׁבוּעוֹת וְיוֹם אֶחָד לָעֽוֹמֶר',

0 commit comments

Comments
 (0)