zmanim
zmanim copied to clipboard
API get multiple days ( or next event )
First of all I must say this is a very impressive project. regarding the API that is available at : https://wyrezmanim.herokuapp.com/api/zmanim
Is there a method to query multiple days from the API ? In short - and for practical implementation of events or calendars - how can one get the NEXT Holiday for example or the NEXT Shabat or Yom Tov ? The only method I can think of now is to do a query every day and then check the result - and if there is no "Parasha" or other name then query the next day and so on ..
Also - regarding that - is there a method in the API to get the NAMES of the days ( like for example are presented in the excel sheet exported from https://kosherjava.com/zmanim-project/zmanim-calendar-generator/
@k9t9 , the https://wyrezmanim.herokuapp.com/api/zmanim is not my project, but I emailed the developer who provided it a link to this issue. As far as the day names, those are part of the formatting code at https://github.com/KosherJava/zmanim/blob/master/src/net/sourceforge/zmanim/hebrewcalendar/HebrewDateFormatter.java , but again, I can't answer for the web API that is not mine on providing this in their API.
Adding @greatjack1 to the thread.
Author of the above-referenced service here,
No there is no date range capability yet, but I will add it to the todo as I think its a good idea.
So in short, currently there is no better way to determine the next shabbos or Yom Tov other than to query each upcoming day
@KosherJava , @greatjack1 Thanks for the super-fast reply. I wanted to implement this in some kind of a "next-event-countdown" and calendar wp plugin for Jewish events that i am doing now for some website, but I intent to released the repo publicly,. For now I will implement the multiple query way.. ( or just use the php library to draw Parashot and Shabat)
Thanks again. I will post the repo link when it's done..