Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daf Yomi: Hebcal reports Midot 34 as Tamid 34 #47

Open
JosephSilber opened this issue May 29, 2018 · 2 comments
Open

Daf Yomi: Hebcal reports Midot 34 as Tamid 34 #47

JosephSilber opened this issue May 29, 2018 · 2 comments

Comments

@JosephSilber
Copy link

JosephSilber commented May 29, 2018

I think I may have found a bug in the naming of a particular daf in the daf yomi calculations.

Current Result

The following yields Tamid 34:

new Hebcal.HDate(new Date('2019-10-21 00:00:00')).dafyomi('h')

...as can be seen in this screenshot:

image

Expected

However, folio number 34 is actually the first daf of Midot, not the last of Tamid. Here's a link to that folio: http://hebrewbooks.org/pdfpager.aspx?req=37968&st=&pgnum=850

Looking at the daf yomi calendar, we can also see that they've labeled it as Midot:

image

I think the bug is here:

hebcal-js/src/dafyomi.js

Lines 120 to 132 in fcf7cbb

switch (count) {
case 36:
blatt = blatt + 21;
break;
case 37:
blatt = blatt + 24;
break;
case 38:
blatt = blatt + 33;
break;
default:
break;
}

@JosephSilber
Copy link
Author

JosephSilber commented May 30, 2018

For reference, here's a list of all the dafim according to the accepted Daf Yomi calendar (note that each folio is earmarked for the tractate with which it starts).

[
    {
        "name": "ברכות",
        "folios": 63,
        "starts_at": 2
    },
    {
        "name": "שבת",
        "folios": 156,
        "starts_at": 2
    },
    {
        "name": "עירובין",
        "folios": 104,
        "starts_at": 2
    },
    {
        "name": "פסחים",
        "folios": 120,
        "starts_at": 2
    },
    {
        "name": "שקלים",
        "folios": 21,
        "starts_at": 2
    },
    {
        "name": "יומא",
        "folios": 87,
        "starts_at": 2
    },
    {
        "name": "סוכה",
        "folios": 55,
        "starts_at": 2
    },
    {
        "name": "ראש השנה",
        "folios": 34,
        "starts_at": 2
    },
    {
        "name": "ביצה",
        "folios": 39,
        "starts_at": 2
    },
    {
        "name": "תענית",
        "folios": 30,
        "starts_at": 2
    },
    {
        "name": "מגילה",
        "folios": 31,
        "starts_at": 2
    },
    {
        "name": "מועד קטן",
        "folios": 28,
        "starts_at": 2
    },
    {
        "name": "חגיגה",
        "folios": 26,
        "starts_at": 2
    },
    {
        "name": "יבמות",
        "folios": 121,
        "starts_at": 2
    },
    {
        "name": "כתובות",
        "folios": 111,
        "starts_at": 2
    },
    {
        "name": "נדרים",
        "folios": 90,
        "starts_at": 2
    },
    {
        "name": "נזיר",
        "folios": 65,
        "starts_at": 2
    },
    {
        "name": "סוטה",
        "folios": 48,
        "starts_at": 2
    },
    {
        "name": "גיטין",
        "folios": 89,
        "starts_at": 2
    },
    {
        "name": "קידושין",
        "folios": 81,
        "starts_at": 2
    },
    {
        "name": "בבא קמא",
        "folios": 118,
        "starts_at": 2
    },
    {
        "name": "בבא מציעא",
        "folios": 118,
        "starts_at": 2
    },
    {
        "name": "בבא בתרא",
        "folios": 175,
        "starts_at": 2
    },
    {
        "name": "סנהדרין",
        "folios": 112,
        "starts_at": 2
    },
    {
        "name": "מכות",
        "folios": 23,
        "starts_at": 2
    },
    {
        "name": "שבועות",
        "folios": 48,
        "starts_at": 2
    },
    {
        "name": "עבודה זרה",
        "folios": 75,
        "starts_at": 2
    },
    {
        "name": "הוריות",
        "folios": 12,
        "starts_at": 2
    },
    {
        "name": "זבחים",
        "folios": 119,
        "starts_at": 2
    },
    {
        "name": "מנחות",
        "folios": 109,
        "starts_at": 2
    },
    {
        "name": "חולין",
        "folios": 141,
        "starts_at": 2
    },
    {
        "name": "בכורות",
        "folios": 60,
        "starts_at": 2
    },
    {
        "name": "ערכין",
        "folios": 33,
        "starts_at": 2
    },
    {
        "name": "תמורה",
        "folios": 33,
        "starts_at": 2
    },
    {
        "name": "כריתות",
        "folios": 27,
        "starts_at": 2
    },
    {
        "name": "מעילה",
        "folios": 21,
        "starts_at": 2
    },
    {
        "name": "קנים",
        "folios": 3,
        "starts_at": 23
    },
    {
        "name": "תמיד",
        "folios": 8,
        "starts_at": 26
    },
    {
        "name": "מדות",
        "folios": 4,
        "starts_at": 34
    },
    {
        "name": "נדה",
        "folios": 72,
        "starts_at": 2
    }
]

@Yitzchok
Copy link

This can be fixed by setting

blatt = blatt + 33;

to blatt = blatt + 32;

and

hebcal-js/src/dafyomi.js

Lines 71 to 72 in fcf7cbb

[ "Tamid", 0, "תמיד", 10 ],
[ "Midot", "Midos", "מדות", 4 ],

Should be changed to
Tamid to 9 instead of 10

[ "Tamid",          0,                  "תמיד",          9],

And while you are there you can fix Midos to 5 so that Niddah can start on the same date

[ "Midot",          "Midos",            "מדות",          5   ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants