Skip to content

Chametz zmanim all year? #2

@Sternbach-Software

Description

@Sternbach-Software

Shouldn't zmanim related to chametz return null when it isn't erev pesach?

Here's how I would do this if you where rebuilding in Kotlin

Have a sealed class of Special Zmanim (or another name) that is returned in a list
so each day has

ZmanimForToday {
all the regular fields, date, sunrise, sunset...
List {
CandleLighting, Chametz, Fasting....
}
}

that way the api can just add or omit items to the list for the given day (fast days, chametz, etc..) and the UI side of things can just render the data directly from the api

in a nutshell, the UI should not have to know or care about the specifics for the given day, it should just render whatever is returned from the api for that day

taking this further, there can be a Configuration class (for things like InIsrael) which is used to initialize the zmanim "engine"

This way you pass the settings in once and create your engine which drives the UI

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