-
Notifications
You must be signed in to change notification settings - Fork 48
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
Why is getParsha defined only on shabbos/saturday #191
Comments
@srulih , |
You can always just do a look-ahead to see what is this coming shabbos's parsha |
@zachweix , that is true, but comes with a small performance hit. |
On Mon, 21 Nov 2022 at 16:56, KosherJava ***@***.***> wrote:
@zachweix <https://github.com/zachweix> , that is true, but comes with a
small performance hit.
@srulih <https://github.com/srulih> , what would be your expectation when
the next Shabbos (or 2) are *Yomim Tovim*. Would you expect it to show
the parsha of the next regular parsha for a few weeks? It would help to
know your use case. Is it just for *Shabbos Mincha, sheni vachamishi
laining*, or do you have something else in mind?
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADESC2M24R6QBYJCU723UGTWJOSUXANCNFSM6AAAAAASF5REW4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
My use case is just to get the current parsha no matter the day of the
week. I am currently using @zachweix work around though it is quite
annoying.
Id expect the logic to be exactly the same as the current getParsha
function though without the requirement that the day is shabbos. We could
add another function getUpcomingParsha if you would like getParsha to stay
the same
|
@srulih , I understand what you want, but I am trying to understand the point (I am sure that you have a good reason, but I am curious). About my other question, if you are between YK and Sukkos and want the parsha, when the next one or 2 weeks may have no parsha, would you expect it to return Bereishis that will occur in a few weeks, or NONE? The same can happen by Pesach. |
That's an interesting question. I like to show the parsha every day on a calendar, so that if you're looking on Wednesday you know that shabbos is Toldos (for example) and on shabbos you know it's toldos. But in theory I can first check the parsha and then only if that fails get the upcoming parsha. |
getUpcomingParsha() would imply the following parsha cos on shabbos the
upcoming parsha is next shabbos
…On Mon, 21 Nov 2022 at 18:38, KosherJava ***@***.***> wrote:
@srulih <https://github.com/srulih> and @zachweix
<https://github.com/zachweix> , assuming we build a getUpcomingParsha(),
if you call it when the date is set to Shabbos, would you expect it to
return the parsha of the current parsha, or the following one?
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADESC2KIRJZM74HDNFYFY3LWJO6T7ANCNFSM6AAAAAASF5REW4>
.
You are receiving this because you were mentioned.
|
Yes it implies that, but it also forces the person using the API to check the day of week. In any case, @zachweix and @srulih ,
|
Interesting, this way when Pesach starts on shabbos for example, then the 9th of nissan will return the parsha on the 29th. |
Slightly tweaked to guard against an error when it is Shabbos
|
getParsha()
defined here returnsParsha.NONE
if the day is not Saturday. However, the parsha of the week is defined for any week by the parsha that is going to be read on that shabbos. So why don't we add logic togetParsha()
to return the parsha that is due to be read on the upcoming SaturdayThe text was updated successfully, but these errors were encountered: