Guba 1 Posted November 21, 2021 Hello to the community. I'm looking for a component or a code library which is capable to convert from UT date to Hebrew calendar date. I've found something in Javascript but I'm not familiar with that language. Thanks for any help. Share this post Link to post
Anders Melander 1783 Posted November 21, 2021 You could roll your own: https://en.wikibooks.org/wiki/Computer_Programming/Hebrew_calendar Here's some code but I have no idea about what language that is: http://www.chelm.org/jewish/calendar/algorithms.html Share this post Link to post
Guba 1 Posted November 22, 2021 Thank you, but chelm seems not working, while the wikibooks page contains something that is quite not usable. All these explanations without any example are completely useless. But thanks however. Share this post Link to post
Vandrovnik 214 Posted November 22, 2021 What about https://stevemorse.org/hebrewcalendar/hebrewcalendar.htm ? Share this post Link to post
Anders Melander 1783 Posted November 22, 2021 Here's a C implementation: https://github.com/yparitcher/libzmanim The code looks well written. Share this post Link to post
limelect 48 Posted November 23, 2021 (edited) Will my free library/component will help you? https://limelect.com/downloads/hebrew-holydays-delphi-components/ I also used it with D10 If you need my help drop an Email Edited November 23, 2021 by limelect Share this post Link to post
limelect 48 Posted November 23, 2021 This is an Hebrew calendar with my component Share this post Link to post
Fr0sT.Brutal 900 Posted November 24, 2021 Damn, I thought old British money system is the most crazy mess I saw. 2 Share this post Link to post
Guba 1 Posted November 24, 2021 On 11/22/2021 at 7:59 AM, Vandrovnik said: What about https://stevemorse.org/hebrewcalendar/hebrewcalendar.htm ? Again, exceptions explanations, but useless unless you take one week understanding the text and writing the code. Thanks however. Share this post Link to post
Guba 1 Posted November 24, 2021 22 hours ago, limelect said: Will my free library/component will help you? https://limelect.com/downloads/hebrew-holydays-delphi-components/ I also used it with D10 If you need my help drop an Email THANKS A LOT, but I have to know if is there any procedure to convert a gregorian date (our common dates) to hebrew date and vice-versa. Or, better, to convert any julian date to hebrew date and vice-versa. Thanks for your reply. Share this post Link to post
Guba 1 Posted November 24, 2021 22 hours ago, limelect said: This is an Hebrew calendar with my component Your calendar is SPLENDID. My compliments. Share this post Link to post
Guba 1 Posted November 24, 2021 7 hours ago, Fr0sT.Brutal said: Damn, I thought old British money system is the most crazy mess I saw. Really, Pal, you have no idea about that.... Share this post Link to post
mvanrijnen 123 Posted November 24, 2021 nice stuff to execise on creating unittests 🙂 Share this post Link to post
Fr0sT.Brutal 900 Posted November 24, 2021 1 hour ago, Guba said: I have to know if is there any procedure to convert a gregorian date (our common dates) to hebrew date and vice-versa Won't ICU help you then? I think they have literally everything for internationalization Share this post Link to post
Vandrovnik 214 Posted November 24, 2021 3 hours ago, Guba said: Again, exceptions explanations, but useless unless you take one week understanding the text and writing the code. Thanks however. There is a link to his homepage and there he has https://stevemorse.org/jcal/jcal.html If you display source code of the page, there are javascript routines, may be it is enough to rewrite them to Delphi? Share this post Link to post
Guba 1 Posted November 24, 2021 4 hours ago, Fr0sT.Brutal said: Won't ICU help you then? I think they have literally everything for internationalization ICU? I don't know this body. Could you post a link to them? Google says a lot of useless infos.... Share this post Link to post
Guba 1 Posted November 24, 2021 2 hours ago, Vandrovnik said: There is a link to his homepage and there he has https://stevemorse.org/jcal/jcal.html If you display source code of the page, there are javascript routines, may be it is enough to rewrite them to Delphi? Yep. I think this could be the only way. I have downloaded the two files which contain the code. The problem is that I'm not familiar with some javascript "amenities". To be really honest, I hate javascript as hemorrhoids. But at least there is the calculator to use for testing the unit to be developed. Share this post Link to post
Fr0sT.Brutal 900 Posted November 25, 2021 (edited) 11 hours ago, Guba said: ICU? I don't know this body. Could you post a link to them? Google says a lot of useless infos.... https://unicode-org.github.io/icu/userguide/datetime/calendar/ Quote ICU has other Calendar subclasses to support non-gregorian calendars including: Buddhist Chinese Coptic Ethiopic Hebrew Indian Islamic Japanese Persian Edited November 25, 2021 by Fr0sT.Brutal Share this post Link to post
Guba 1 Posted November 26, 2021 15 hours ago, Fr0sT.Brutal said: https://unicode-org.github.io/icu/userguide/datetime/calendar/ well, first of all a BIG thank you for the indication. Second, unfortunately it is a library written in C++ or something, and it makes me shake my knees to just only "think" to deploy such code to one of my users. It is a piece of code that I don't control, and there is only one other thing that I hate more than this. Third you know what? there is not a single example with the Hebrew calendar, while there is one for Japanese. However I will study this solution for a while, but I think I will try the stevemorse.org solutions, notwithstanding, as I said, I hate javascript. However THANKS a lot for the infos. Be well. Share this post Link to post
Fr0sT.Brutal 900 Posted November 26, 2021 6 hours ago, Guba said: Second, unfortunately it is a library written in C++ or something, and it makes me shake my knees to just only "think" to deploy such code to one of my users. It is a piece of code that I don't control, and there is only one other thing that I hate more than this. This lib in fact became industry standard and is used by numerous apps - Node, Chrome, Firebird... It's even included in W10: https://docs.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu- I guess when you do encrypted network connections you don't implement your own TLS engine but use OpenSSL for this or something alike? The same with ICU. Anyway it's all up to you 😉 Share this post Link to post
limelect 48 Posted November 26, 2021 On 11/24/2021 at 5:13 PM, Guba said: THANKS A LOT, but I have to know if is there any procedure to convert a gregorian date (our common dates) to hebrew date and vice-versa. Or, better, to convert any julian date to hebrew date and vice-versa. Thanks for your reply. I made this component years ago so I cannot help By the way, independence day is not there it is only religious days Share this post Link to post