You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HebrewCalendar.getHolidaysOnDate(date, false) returns an Event array if there are any events for the given date. How do I select what kind of events I want? For example, if I only want Chagim, how would I do it?
I see Hebcal has flags. However, .getHolidaysOnDate does not have an option to pass them in. I also see that Event has a mask field, which seems to identify the specific holiday. However, how can I figure out which category a holiday is a part of?
The text was updated successfully, but these errors were encountered:
TheBestMoshe
changed the title
Example how exclude holiday types with HebrewCalendar.getHolidaysOnDate
Example how to exclude holiday types with HebrewCalendar.getHolidaysOnDateOct 7, 2021
Hi, thanks for the bug report. It looks like we could do a better job of documenting which holidays use which flags. You can certainly call filter() on the results of this function to select holidays you prefer based on their flags.
In the meantime, if you want fine grained control over which holidays are included, you can consider using the well documented HebrewCalendar.calendar() function. You can even specify a single date using that function by setting the start and end parameters to the same Date or HDate value.
@TheBestMoshe I'm going to close this issue as I think recent documentation changes may have made it easier to solve your problem. If you have additional questions, feel free to reopen
HebrewCalendar.getHolidaysOnDate(date, false)
returns anEvent
array if there are any events for the given date. How do I select what kind of events I want? For example, if I only want Chagim, how would I do it?I see Hebcal has flags. However,
.getHolidaysOnDate
does not have an option to pass them in. I also see thatEvent
has amask
field, which seems to identify the specific holiday. However, how can I figure out which category a holiday is a part of?The text was updated successfully, but these errors were encountered: