From time-to-time users of this site contact me with zmanim related questions, both technical and halachic. While I do not mind answering these questions, an open forum is probably more helpful to a greater audience. Please feel free to post your zmanim questions and comment here. While the target of this API were Java programmers, the vast majority of questions/comments are not related to the actual API. Here are some recent questions received (made generic).
- Q: Can you let me know what calculations/opinion is used by the zmanim shown at [link removed]? I tried contacting the owner of the site but no one replied.
A: I was able to answer the user based on information on the site and comparing the zmanim. - Q: What opinion does zman XYZ follow?
A: The information can be seen in the Javadocs, and I added additional information in the email to the user. - Q: How can I use your API in JavaScipt/Ruby/PHP/C#/C++/Obj-C etc, etc
A: The API is written in Java. The Zmanim API was already ported to many languages. The API is currently ported to- .NET (Zmanim.NET)
- Objective-C (KosherCocoa)
- TypeScript / JavaScript (KosherZmanim) and JavaScript (ZmanJS)
- Ruby (Ruby Zmanim)
- Scala (Jewish-date)
- C (Libzmanim)
- Python (Python Zmanim
- PHP (PHPZmanim)
- Dart / Flutter (KosherDart)
If you are looking for it in different programming languages, a port is likely needed. I am more than willing to help guide you and make changes to my API to allow easier porting, but this is not something that I have the time to do myself.
- Q: Your zmanim spreadsheet does not show a time for tzais as X minutes after shkiah etc.
A: In some of these cases I actually added zmanim to the API, but for the less commonly used times, I point the questioner to the API with a sample on how to generate the requested zman. The API is very flexible, and almost every zman pointed out to me was very easy to generate - Q: Why are your zmanim 2 minutes different than [link removed].
A It is not always clear what exact coordinate was used to generate those zmanim or what rounding was done by the author. If you provide more detailed information (usually by contacting the author of that calendar) you will usually find that the 2 can be matched - Q: I want to incorporate a Luach on my site, can you help?
A: Yes, the KosherJava API has full Luach support. Zmanim are based on a solar year, and there is no need for the Hebrew date for the calculations of zmanim (with the exception of kiddush levana times), but full Hebrew calendar support is part of the API. This was based on Avrom Finkelstien’ java API for a Luach released in in 2002 (a cache is available via the The Wayback Machine). It was modified and integrated it into the KosherJava Zmanim API. - Q: I found the following bug in the API!!!
A: I welcome these reports even though the majority are not bugs at all. You can contact me directly or post it to the KosherJava zmanim GitHub issues list.
Hi ,
Thanks for sharing ,
I am trying to find an example for using the Zman Class ,
I wish to send a date and get it in Hebrew format .
I am trying to as fllow :
Date d1 = new Date();
Zman _zman =new Zman(d1,”MyNewTime”); (what the label an the zman constructor use for?)
_zman.setZman(d1) ;
then here i want to display my new Hebrew date ,
can i do that with the zman class ?
Thanks Zohar
Zohar,
See my FAQ: Where is the Zmanim API Main Method? post for some basic developer information on using the API.
Is there a way to get Zmanim for a different day?
Ori,
Are you referring to the API, map or spreadsheet?
API
There is documentation for this in the base AstronomicalCalendar class. ZmanimCalendar and ComplexZmanimCalendar should behave the same way.
Please look at this site. zmanim is a bottom of page but the zmanim is not showing
Luach for Ohev Tzedek-Shaarei Torah
4 Shevat 5771
ד’ שבט תשע”א
Zmanim
Alos HaShachar:
Netz:
Earliest Tallis:
Latest Sh’ma:
Chatzos:
Mincha Gedola:
Mincha Ktana:
Plag Hamincha:
Shkiah:
Hide
Shabbos
It will come in 6 days.
Candle light :
Shabbos ends:
Do I need to configure something else?
Thank you,
Dave
Dave,
The plugin is produced by kosherdev.com (not kosherjava.com), and you should ask the question there.
Can’t you make this site a little easier for us computer illitirate people that need some zmanim.
Charles
moose jaw, SK
Charles,
Thanks for your interst. This site is targeted mostly at software developers interested in using zmanim in their programs. That said, there are 2 very easy to use ways to get the zmanim you require
Please let me know if there is anything specific that you are looking for.
you wrote “Zmanim Calendar Generator. This will generate a spreadsheet with zmanim for the entire year. You will also find a link to this on the bottom of the zmanim list in the Zmanim Map” I tries clicking on “Zmanim Calendar Generator” and the link was dead.
Thanks
Charles,
There was a typo in the URL I used, and it is now pointing the the proper one. Please try clicking the link again. The URL is https://kosherjava.com/zmanim-project/zmanim-calendar-generator/.
Just got the ZmanimGUI working. Is there a way to get Misheyakir to show on it?
Contact the author Moshe Wagner at the email address mentioned in the Zmanim GUI Released post, or via his פינגווין עם כיפה blog.
Hy,
can you please tell me any function in this api to check its holiday in jewish calendar for specific date …
i need to list of all holidays list of jewish calendar , list of days of Rosh Chodesh holidays , and Omer holidays number.. i checked in libhdate provide all functions , but i not found these all functions or functionality in this api.. can you please inform me below all functions are available in java api or not ?
i need below all functions functionality…
– get_holyday_type() — the holiday type
– get_omer_day() — get the day of the omer
– get_holyday_string() — string of hebrew holiday name
– get_holyday() — the hebrew holiday number
any other suggestion welcome.
Thanks
Samit,
I suggest that you check out the KosherJava Zmanim API Javadocs. Specifically look at the net.sourceforge.zmanim.hebrewcalendar package. This package (unlike the rest of the code in the API) is at alpha quality now, but does work.
Thanks for your quickly reply..
i checked net.sourceforge.zmanim.hebrewcalendar package but not found specific function which i mentioned my above post..
can you give me some description or some suggestion for how to check specific date is current holiday or not and if holiday then i need to holiday name.. i checked hebrewcalendar package but not found or not understand which function i use so please any suggestion..
Thanks
Samit,
Here is some sample code. I am afraid that I can’t offer any additional help at this point. The code below should have been pretty clear from the JavaDocs.
Thank you very much…
now my problem solved for using your sample code.i checked but some step missing in my code so not got answer.. now this sample its very helpful me. thanks for your suggestion and demo sample.
Hello KosherJava ,
Again Thanks for earlier helps…
can you please solve my questions regarding api.
i need to jewish holiday list of year , when i passed year then return all holiday names and dates.
i implemented this way : pass date and check its holiday but this way i pass all days of year and get response of api is holiday its takes more time to check whole year.
so any function in api which return all jewish holidays name and dates when i passed year in function.
Please tell me any another way to get all holidays list and dates of year quickly.
Thanks
Hi there,
I’m getting an app built to show the time in shaot zmaniot and allow users to set alarms and reminders based on the zmanim (e.g. x mins before 4:00 Daytime for shacharit).
As part of the app, we’ll be adding some notifications on dates in the jewish calendar, and would love to add the 5 d’rabanan fast days along with a reminder the day before (or that morning) that it’s a fast day.
Are there any plans to add fast days to the hebrew calendar part of the app? It’s non-trivial to add ourselves what with the various halachot of bringing forward/pushing back when they fall no shabbat (like this year), so hoping there’s a pre-coded add on available for it.
Thanks!
Benjy
Benjy,
Fast days are already part of the API. See the Zmanim JavaDocs, and specifically the JewishCalendar.html.isTaanis() method. You can get the specific taanis by
Please note that the calendar part (unlike the zmanim) of the API is beta quality.
The Zmanim API looks great and useful, but before I go and reinvent the wheel, has anyone written a program that I can use to create Zmanim.
Alternatively, can I download the code of the demo calculator, so that I can use it off-line?
Bernard,
There are many programs using the KosherJava Zmanim API. There are Zmanim API code samples scattered through this site. The demo calendar generator code is not a very good example, but I can share it with you if you would like it. You are probably better off using the code samples and the How to Use the Zmanim API page.
The link that you showed me is only for mobile phones and I would like either a spreadsheet or a program that can output to a spreadsheet. The Zmanim calendar is very comprehensive but I would like to have an offline version and also, something that shows fast days, as these can vary according to the day of the week.
The coding for mobile or non-mobile uses the same API. Use POI HSSF to do this. As far as fast days, I tweaked the code added them to the spreadsheet. Feel free to contact me via the Contact link for spreadsheet details.
Is anyone else having a problem with sunrise and sunset times on the 2013 zemanim spreadsheet? I generated the spreadsheet using my synagogue’s Google Maps location data–same as last year–and all the times are correct EXCEPT sunrise and sunset, which are three minutes (or perhaps three days) off when compared to 2012 and when compared to other reference material. Is this an algorithm or data input issue??
David,
Thank you very much for pointing this out to me. The problem in the Zmanim Calendar is now resolved (though you will see from my explanation below that it was not a real issue). Last year when you set your location you did not set the elevation, so the calendar calculated it for sea level. This year, with Google Map integration, I automated the elevation look-up. The calendar always used elevation adjusted sunrise and sunset for the “standard” calendar, and both elevation adjusted and sea level for the “full” version, however, most people did not look up the elevation in the past, so sea level times were usually returned. Your location (as disclosed in an email) has an elevation of 186 meters above sea level, and this results in an almost 3 minute difference VS sea level. Calculated for January 7 for your location:
Sunrise (186 meters): 7:43:57 AM
Sunrise (Sea Level): 7:46:45 AM
Since people using the standard calendar probably do not expect the elevation adjusted sunrise and set (although it is not wrong), and since most other calendars do not use elevation adjustment, I changed the calendar to now show sea level sunrise in the standard calendar. Ask your Rabbi about sea level VS elevation adjusted. You may want to see the following posts on elevation.
Thanks for the clear explanation! I did check with my Rav and for our particular area/circumstance we decided to use sea level for Erev Shabbos as it is used by all the other Shuls in our area and because it’s earlier than true sunset–which benefits last-minute rushers like myself. This also means that to be machmir on Motzei Shabbos we should not be too hasty to end Shabbos (especially for those who hold the earliest zman) to avoid any issues. Of course if someone is below sea level the ruling might be quite different and a Rav should be consulted.
–David
Hi,
Is there a way to get moonrise/moonset times? I cannot find anything in AstronomicalCalendar.
Only solar times are currently supported by the API. I have no current plan on adding moonrise and moonset times.
Greetings,
I’ve used your Direction to Yerushalaim applet numerous times over the years – thank you for such a useful tool! However, a couple or four years ago the search button has disappeared, so now I have to zoom and drag. Your instructions still reference a “search field on the bottom right,” but I see no such thing in either Chrome or Firefox. What am I doing wrong?
Thanks,
Yisroel,
When I go to the Zmanim Map I see the search field in the bottom left corner in IE, Firefox and Safari. When viewing the map on pages embedded in the blog such as Zmanim Map 3.5 adds Date and Algorithm Selection, the search fields are intentionally hidden due to space constraints. Let me know if you still have trouble seeing the search field.
Hello
Thank you for a very interesting website.
However, when I tried to use the calendar I thought that I got ridiculous values, but as I was detailing the question, I realized that the labels at the top are off by 1 column. Column E is blank in the data, but the labels start above it. So Alos 16.1 degrees is above the blank column, and everything else is off by one. I do not think this is the result of something I did wrong. I am using Latitude: 31.79984, Longitude: 35.21846; Elevation: 756.43; Time Zone: Asia/Jerusalem
M,
Thank you very much for your bug report. The issue with the Zmanim Calendar generator was a bug related to the recent addition of Daf Yomi to the “Type/Full” calendar. The issue is now corrected.
Hi Kosher Java,
I might be going to Necker Island
to work as a Mashgiach, would you know the Zmanim for this place, and if there are any Halachik issues there that I should be aware of.
Thanks
Chaim
Chaim,
Zmanim for Necker Island can be seen on the KosherJava Zmanim Map. Just enter Necker Island in the search field on the bottom left corner. The search will bring you to the Zmanim map zoomed in on Necker Island. Since it is nowhere near the IDL (International Dateline), and is in fact the same longitude as Nova Scotia, Canada, there should be no issue from that aspect either. See the KosherJava International Dateline map zoomed in on Necker Island to see the location in relation to the IDL. I can’t even begin to guess as to kosher food there. Have a look around Dan’s Deals for those type of travel related questions.
Have a safe and enjoyable trip.
https://forums.dansdeals.com/index.php?topic=50746.0
i dont understan why do not work for me. the time of sunrise and other are wrong
this is my code… for lat lon ele : Elad Israel
//////////////////////////////// LOG INFO
04-28 00:23:12.892 28223-28223/com.myluaj.zmanim I/candles: Thu Apr 28 12:00:58 EDT 2016
????????? candles at 12:00 ??????????
04-28 00:23:12.893 28223-28223/com.myluaj.zmanim I/Today’s Zmanim for: Elad, Israel
04-28 00:23:12.893 28223-28223/com.myluaj.zmanim I/sunrise: Wed Apr 27 22:54:48 EDT 2016
?????????SUNRISE AT 22:54 Hs??????
Asher,
Your mistake is trivial and was addressed in an old post FAQ: Outputting Zmanim for A Different Time Zone With the the Zmanim API. Based on the output you provided, I see that your device/computer is set to a different timezone than Israel (ETD – Eastern Daylight Savings time). This results in the output of the date being formatted based on the time zone of your local computer.
Also, I do not know what the values of hlat, hlon etc. are, but you are setting them twice. Once when calling the GeoLocation constructor, and the second time when you call
I assume that this is just leftover code.
What happened to R’ Moshe’s chatzos and other resulting differences in the zmanim?
R’ Moshe’s chatzos is part of the API. See getFixedLocalChatzos(), getSofZmanShmaFixedLocal() and getSofZmanTfilaFixedLocal(). The demo Zmanim Calendar returns these zmanim.
Good Afternoon,
I have a few questions and I’ll appreciate very much if anyone could please help me. Or give me some ideas.
So I have a programmer that is going to design a shul schedule, builtin and zman calendar in one. He will most likely be using excel to build it. Since they are not jewish, I didn’t go much in to detail with them about the concept of Alos, netz, mincha, plag, etc… I just need to tell him which zman goes to which line.
I did find the myzmanim.com excel file. And I did ask them a few questions. But as of now its not availbe. But they saif If I find it somewhere I could just ad it as another column. Since the programmer is an expert with excel. They will have no issue with adding a few columns so its part of the caluation. (If I’m not mistaking, I did find an excel file on this site as well, But I think this one had much less options. If there is something I didn’t see please guide me to it)
For example, to make a column that will calculate that the time for Mariv motzei Shabbos, is 8 minutes before 72min. that the Programer could do. Or Mincha Friday Afternoon, 10 minutes after candle lighting. And most of the columns are in there.
But these are my main questions. Since myzmanim.com can’t provide it. And I’d like very much to get in there.
#1 the Seferas haomar is in alef Bet order, Anyone have it in the way we say it? היום יום אחד & the shem for that day נצח etc… I think it would be a nice addition.
#2 If there would be a way to ad A moled column for Shabbos mvorchem, And a column that would show the days of Rosh Chodesh on shabbos as well
Example: שבת מברכים חודש אלול
שבת קודש, יום ראשון
12:30 AM מולד יום שני
etc… 1 ושני חליקים אחר
just an example. They do give moled, But I’m not sure its editable. If It is, I could ask the programmer if he could ad a column and set it so it shows on Shabbos day or until the start of Kidush levana,
Which leads to the next question.
It would be amazing, If anyone knows and has the know how, to add a column that will show the kidush levana, from the proper time. (our cumtom is zeven shleimim.) and somehow show, something like, סוף זמן קידיש לבנה Monday afternoon at 3:16 PM etc.. A count down would be even nicer. Example: 5 days & 2 hours and 3 minutes. But that is asking for to much.
Any ideas would be very greatly appreciated.
have a gut g’betched year.
I have the zmanim app on my android and ever since the last update, it is displaying zemanim that I did not ask for and not zemanim that I chose . What’s happening.
Mordechai,
There are about 20 different Android apps that use my Zmanim API. While I wrote the API (think of it as the engine that calculates the Zmanim). What app are you using?
Hello,
I am looking for code that can calculate haftarah.
Can you please help me?
Best regards,
Daniel
Daniel,
I am sorry, but the API does not support this. Due to licensing issues we recently had to remove parsha support, but we never supported haftarah even before this. I can’t rule it out, but I do not see it happening in the near future.
Hello,
Is there an API for zman Tfilin and Tzitzit?
Thanks. Refael.
Rafael,
There are multiple misheyakir times in the API for this. You can find the Misheyakir times in the source.
Oh, great. Thank You 🙂
Im trying to generate an ICS, or import the years times into google calendar. How can I do this easily?
Hi,
Thank you very much for the API im currently trying to use it for an app im making.
I just wanted to ask I cant find a method to get the time for Havdallah/Shabbat ends, am I supposed to be calculating it or getting it from another method. If so could you tell me how, I know there are varying halachic opinions but I just want to calculate it the most held off way, whichever way its most likely to be found if I just pick up a jewish calendar somewhere, I assume that for havdallah RT I just use the Tzezis72 method? But I care more about regular havdallah time. And if I get it from another method do I calculate it as certain minutes from sunset or from tzeit??? Bit confused.
Thanks
I ended up using sunset and then adding 42 minutes, would this seem correct?
Jack,
If you are looking for a fixed offset, yes.
Something along the lines of
As an example, see the Source code for 72 minute tzais.
Why have you not put in Halachik Times ‘hantz hanireh’ (הנץ הנראה), which is later than the ‘netz’ you have written.
For example, I am from Rechovot, today (24/11) 6.22.30 is netz hanireh.
Thanks,
HaRav Talbi
050-6422195
Rabbi Talbi,
The Halachic app that you reference uses my library, but is not something that I coded. Hanetz Hanireh is something not yet supported by the API. Calculations for it are complex and require detailed digital elevation model to compute. I look forward to anyone contributing support for this to my open source zmanim code.
hay,
what the number of year I can rely on the project to give my the correct time of Shabbat and Hagg?
Do you plan to update the project when the time come(if the enter or exit Shabbat will have an offset)
Avi,
see the Historical Dates section of the NOAA Solar Calculation Details page.
If I am still around and coding at that time I plan on updating it 😊.
Eliyahu,
Thanks so much for this API, I’ve used it many times in my programming.
I’m working on a program where I start with a Jewish month / day and get generate yurtzeit dates for the next number of years.
The issue is that if the yurtzeit month is 13, I need a way to check if the current year is a leap year. If it isn’t the API throws an exception, as it should.
I wanted to use JewishDate.isJewishLeapYear(year) to test for leap year but this method is declared as private. I would like to ask that method be made public.
Perhaps you would consider make a “getYurtzeit()” function 🙂
Thanks again, Brocho V’Hatzlocha!
Dovid,
This is interesting and I will have to look into it. The main issue I see is that there are other “edge” cases such as a person passing away on 30 Marcheshvan on a maleh year. If the first yahrzeit is a chaser, there are differing opinions. There are other such cases. Since there is not a straight forward answer, just addressing your example with a
getYahrtzeit()
method would leave people assuming that it “just works” for all cases. I would have to allow parameters and set flags on the class to allow setting the proper minhag. This is something probably best discussed on the #zmanim channel on the Frum Developer’s Slack. Please contact me for details.היי הבחנתי בבאג מוזר כשאני קורה למתודה ZmanimCalendar().getSunset() בין השעות 00:00 ל02:59 הוא מחזיר ערך שקיעה של היום שלפני
Hi I noticed a strange bug when I call the ZmanimCalendar().getSunset() method between 00:00 and 02:59 it returns a sunset value of the previous day
יעקב,
I need more information. Please supply small and full sample code that triggers this bug. In this case you seem to be in Israel that is UTC+3 (summer time). Please see FAQ: Outputting Zmanim for A Different Time Zone With the Zmanim API that will likely help your issue.
Thank you for offering the service. As far as I understand, the times for Tzais Baal Hatanya correspond to the end of civil twilight for the elevation ‘0 metres’ (at sea level), even if a given place is situated at an higher altitude, for which the times of sunrise and sunset are adjusted accordingly. I wonder how much longer the civil twilight would actually be for elevations of several hundred metres — probably several minutes.
Matthias,
As far as elevation impacting civil or other twilight, it does not. tzais is driven by the level of light in the sky, and this is not impacted by elevation (to the contrary, due to the thinner atmosphere, there is likely the ability to see stars even earlier.For this reason, elevation is never used for degree based calculations. See the Elevation Now Only Impacts Sunrise and Sunset Calculations in the Zmanim API article on the subject.
Sunrise is impacted. See the FAQ: How Much Earlier is Sunrise on Mount Everest Due to Elevation? article.