{"id":13486361,"url":"https://github.com/BehindTheMath/KosherZmanim","last_synced_at":"2025-03-27T20:32:51.746Z","repository":{"id":49819806,"uuid":"103986543","full_name":"BehindTheMath/KosherZmanim","owner":"BehindTheMath","description":"Port of the KosherJava zmanim library to TypeScript","archived":false,"fork":false,"pushed_at":"2024-06-06T00:12:52.000Z","size":2614,"stargazers_count":38,"open_issues_count":9,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-15T15:24:33.518Z","etag":null,"topics":["daf-yomi","hebrew-calendar","hebrew-date","jewish-holidays","nodejs","typescript","typescript-library","zman","zmanim"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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":"CHANGELOG.md","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":"2017-09-18T20:07:54.000Z","updated_at":"2024-02-06T19:23:07.000Z","dependencies_parsed_at":"2022-08-28T06:10:48.777Z","dependency_job_id":"f4762fd8-b9ef-44f2-87ce-a5920e0ac2ef","html_url":"https://github.com/BehindTheMath/KosherZmanim","commit_stats":{"total_commits":207,"total_committers":2,"mean_commits":103.5,"dds":0.004830917874396157,"last_synced_commit":"b6136ed5092fee9ef902d0dc56ac88d436f71c40"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2FKosherZmanim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2FKosherZmanim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2FKosherZmanim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BehindTheMath%2FKosherZmanim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BehindTheMath","download_url":"https://codeload.github.com/BehindTheMath/KosherZmanim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245920516,"owners_count":20694110,"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":["daf-yomi","hebrew-calendar","hebrew-date","jewish-holidays","nodejs","typescript","typescript-library","zman","zmanim"],"created_at":"2024-07-31T18:00:44.638Z","updated_at":"2025-03-27T20:32:51.739Z","avatar_url":"https://github.com/BehindTheMath.png","language":"TypeScript","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\nKosher Zmanim is a TS/JS port of the [KosherJava](https://github.com/KosherJava/zmanim) library.\n\n# Installation\n**NPM:**\n```\nnpm install kosher-zmanim\n```\n\n**UMD (browser):**\n```html\n\u003cscript src=\"https://unpkg.com/kosher-zmanim/dist/kosher-zmanim.min.js\"\u003e\u003c/script\u003e\n```\n\nIt is highly recommended that you pin the version (e.g. `https://unpkg.com/kosher-zmanim@0.6.0/dist/kosher-zmanim.min.js`),\nso updates don't break your app.\n\n# Usage and Documentation\n#### Importing\n**ES6 modules / Typescript:**\n```javascript\nimport * as KosherZmanim from \"kosher-zmanim\";\n```\nOr:\n```javascript\nimport { ComplexZmanimCalendar, getZmanimJson } from \"kosher-zmanim\";\n```\n\n**CommonJS modules:**\n```javascript\nconst KosherZmanim = require(\"kosher-zmanim\");\n```\nOr:\n```javascript\nconst { ComplexZmanimCalendar, getZmanimJson } = require(\"kosher-zmanim\");\n```\n\n**UMD (browser):**\n\nFor UMD, a global `KosherZmanim` object is exposed.\n\n#### Library Usage:\nThe KosherJava library has been ported to JS, following the original API as close as possible.\nThe classes are exposed as named exports. You can instantiate or extend those classes as necessary, the same way you would in Java.\n\n```javascript\nconst zmanimCalendar = new KosherZmanim.ZmanimCalendar();\n```\n\nSee the [KosherJava API documentation](https://kosherjava.com/zmanim/docs/api/index.html?overview-summary.html) for more details.\n\n#### Simple usage\nAlternatively, there is a `getZmanimJson()` utility method.\n\n```javascript\nconst zmanim = KosherZmanim.getZmanimJson(options);\n```\n\nCheck out the [demo](https://behindthemath.github.io/KosherZmanim/), and look at the [code](./docs/index.html) to see an example of how it's used.\n\n##### `options` object\nThe `options` object has the following structure and defaults:\n```\n{\n    date: Date | string | number = new Date(),\n    timeZoneId: string\n    locationName?: string,\n    latitude: number,\n    longitude: number,\n    elevation?: number = 0,\n    complexZmanim?: boolean = false,\n}\n```\n\n## Note about how zmanim are calculated\nThis library uses [Luxon](https://moment.github.io/luxon) as a date/time library, since\nJavascript's `Date` object does not support setting timezones other than the system timezone.\nAll class methods that return a `DateTime` object will be in UTC.\n\n# Breaking changes from KosherJava\n* `AstronomicalCalendar.getTemporalHour()` returns `null` instead of `Long.MIN_VALUE` if the calculations cannot be completed.\n* JS/TS does not have a parallel to Java's `Long.MIN_VALUE`, so `Long_MIN_VALUE` is set to `NaN`.\n* The following methods are not supported:\n  * `AstronomicalCalendar.toString()`\n  * `AstronomicalCalendar.toJSON()`\n  (Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead).\n  * `AstronomicalCalculator.getDefault()`\n  (Use `new NOAACalculator()` instead).\n  * `JewishCalendar.getDafYomiBavli()`\n  (Use `YomiCalculator.getDafYomiBavli(jewishCalendar)` instead).\n  * `JewishCalendar.getDafYomiYerushalmi()`\n  (Use `YerushalmiYomiCalculator.getDafYomiYerushalmi(jewishCalendar)` instead).\n  * `Time.toString()`\n  (Use `new ZmanimFormatter(TimeZone.getTimeZone(\"UTC\")).format(time)` instead).\n  * `ZmanimFormatter.toXML()`\n* Some method signatures are different, due to the differences between Java and JS.\n* The `Zman` class uses public members instead of getters and setters.\n","funding_links":[],"categories":["Projects"],"sub_categories":["Zmanim"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBehindTheMath%2FKosherZmanim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBehindTheMath%2FKosherZmanim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBehindTheMath%2FKosherZmanim/lists"}