{"id":17101289,"url":"https://github.com/behindthemath/zmanim-sql","last_synced_at":"2025-10-26T06:44:50.590Z","repository":{"id":221085663,"uuid":"753407032","full_name":"BehindTheMath/zmanim-sql","owner":"BehindTheMath","description":"A partial SQL port of the KosherJava library","archived":false,"fork":false,"pushed_at":"2024-02-06T05:38:14.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-15T15:24:41.497Z","etag":null,"topics":["mysql","sql","zmanim"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BehindTheMath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T03:50:37.000Z","updated_at":"2024-02-06T22:23:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"e67199bb-3b16-4a1e-bf36-64624424afec","html_url":"https://github.com/BehindTheMath/zmanim-sql","commit_stats":null,"previous_names":["behindthemath/zmanim-sql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2Fzmanim-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2Fzmanim-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2Fzmanim-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2Fzmanim-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BehindTheMath","download_url":"https://codeload.github.com/BehindTheMath/zmanim-sql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153896,"owners_count":20569408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","sql","zmanim"],"created_at":"2024-10-14T15:24:40.055Z","updated_at":"2025-10-26T06:44:50.507Z","avatar_url":"https://github.com/BehindTheMath.png","language":"Shell","readme":"## This project is at an alpha stage.\n\nThings will break, and APIs might change. Be cautious using this in production.\nAdditionally, not all methods have been tested for accuracy.\n\n# Introduction\nzmanim.sql is a partial SQL port of the [KosherJava](KosherJava/zmanim) library.\n\nThe dialect used is MySQL.\n\n# Installation\nRun the scripts in the context of your DB.\n\n# Usage and Documentation\n### Pure static KosherJava methods\nIn general, pure static KosherJava methods were converted to deterministic functions.\n\nE.g., in `JewishDate`:\n```java\nprivate static int getLastDayOfGregorianMonth(int month, int year)\n```\n\nwas converted to:\n```sql\nCREATE FUNCTION JewishDate_getLastDayOfGregorianMonth(month INTEGER UNSIGNED, year INTEGER UNSIGNED) RETURNS INTEGER UNSIGNED\n    DETERMINISTIC\n```\n### Impure instance methods\nImpure instance methods were usually converted to stored procedures that return multiple `out` parameters,\nwith the `out` parameters corresponding to the instance methods that are mutated.\n\nE.g., in `JewishDate`:\n```java\nprivate void absDateToJewishDate()\n```\nwhich uses instance property `gregorianAbsDate` and mutates instance properties  `jewishYear`, `jewishMonth`, and `jewishDay`,\nwas converted to:\n```sql\nCREATE PROCEDURE JewishDate_absDateToJewishDate(gregorianAbsDate INTEGER UNSIGNED, OUT jewishYear INTEGER UNSIGNED,\n                                     OUT jewishMonth INTEGER UNSIGNED, OUT jewishDay INTEGER UNSIGNED)\n    DETERMINISTIC\n```\n### Helper procedures\nSome helper procedures have been added to take the places of constructors and methods that only make sense in an instance context.\n\nE.g. instead of the following:\n```java\nCalendar calendar = Calendar.getInstance();\ncalendar.set(2023, Calendar.DECEMBER, 31);\nJewishDate jewishDate = new JewishDate(calendar);\nint jewishYear = jewishDate.getJewishYear();\nint jewishMonth = jewishDate.getJewishMonth();\nint jewishDay = jewishDate.getJewishDayOfMonth();\n```\nuse the following:\n```sql\nCALL gregorian_date_to_jewish_date(2023, 12, 31, @jewishYear, @jewishMonth, @jewishDay);\nselect @jewishYear, @jewishMonth, @jewishDay;\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehindthemath%2Fzmanim-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehindthemath%2Fzmanim-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehindthemath%2Fzmanim-sql/lists"}