Skip to content

Suggestion: Add a parameter to Zmanis methods to let the user choose which temporal hour to use. #173

@Elyahu41

Description

@Elyahu41

Right now, in the current version of KosherJava, all the methods enumerated below rely on Shaah Zmanis (Temporal Hours) and by default they use the getShaahZmanisGra() method.

Here is a list of methods that use the getShaahZmanisGra() method:

getTzais72Zmanis();
getTzais90Zmanis();
getTzais96Zmanis();
getTzais120Zmanis();

getAlos72Zmanis();
getAlos90Zmanis();
getAlos96Zmanis();
getAlos120Zmanis();

However, if I want to use these methods with getShaahZmanisMga(), I would have to implement my own method. And so too for other shaah zmanis opinions.

Wouldn't it be better to add a parameter to ask which shaah zmanis to use? Something like this:

public Date getTzais72Zmanis(long shaahZmanis) {
long shaahZmanis = shaahZmanis;
if (shaahZmanis == Long.MIN_VALUE) {
return null;
}
return getTimeOffset(getElevationAdjustedSunset(), shaahZmanis * 1.2);
}

for all the methods above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions