Giter Club home page Giter Club logo

koshercocoa's Introduction

KosherCocoa

KosherCocoa is library that allows you to use sunrise, sunset, Jewish holidays, and other Hebrew calendar calculations in your app.

Features:

KosherCocoa offers seven distinct features, each provided by a set of classes in the library. They are:

  • Sunrise/Sunset - When the sun rises and sets at a given latitude, longitude, and altitude.
  • Zmanim - Shema, Zman Tefila, Chatzos, and more.
  • Zmanim Metadata - How each zman is calculated, related zmanim, and the calculation's name in Hebrew, English, and two flavors of transliterated English. (Help translate this into other spoken languages.)
  • Parashat Hashavua - Weekly torah portion, with schedules for Israel and Chul.
  • Sefira - The omer count between Passover and Shavuot.
  • Daf Yomi - The daily talmud study program followed by thousands of Jews worldwide.
  • Chagim - When Jewish holidays fall.

Setting it up:

Clone into the repository.

Drag the KosherCocoa Xcode project into your own and add KosherCocoa framework as a dependency.

CocoaPods: KosherCocoa supports CocoaPods as of version 3.0.2. Add the following line to your podfile:

'KosherCocoa', '~> 3.6.0'

Technical Requirements:

The latest version of KosherCocoa has been developed with the iOS 9 SDK and Xcode 8. To use the Framework, you'll need to target iOS 8 or higher, macOS 10.11 or higher, tvOS 9.0 or higher, or watchOS 2.0 or higher.

Using KosherCocoa:

Read the documentation or poke around the file headers.

Contributing:

If you'd like to help localize this framework so users of other languages can benefit, please see this issue.

License:

KosherCocoa is hereby released under the modified LGPL License, version 2.1. See the full text of the license on the GNU website. One additional modification to the license is below:

By using this project in your app, you represent that your app does not replicate Ultimate Zmanim in primary functionality or in appearance. You agree not to release an app which includes a list of zmanim as its primary function, neither paid nor for free. An example of an acceptable use is to dynamically change contents of a siddur app, or calculate the weekly torah reading in a chumash app. You further agree to comply with any and all takedown requests.

This clause is not intended to change or override anything in the LGPL 2.1 license, nor is it intended to override local laws and regulations.

Basically, I'm tired of copycat apps, so please stop.

Thanks!

Please let me know if you're using the KosherCocoa framework in your app!

koshercocoa's People

Contributors

elyahu41 avatar jbemt48 avatar mosheberman avatar readmecritic avatar sharshi avatar sousben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koshercocoa's Issues

Installing via Cocoapods does not work

In your Cocoapods spec there is a typo that prevents it from finding any file:

"KosherCocoa/Library/.{h,m}" should probably be "KosherCocoa/Library//.{h,m}"

Thank you!

Help please....

ื‘"ื”

Hi,

Thanks for the great library!
I'm writing an App remainder to read Tehilim that should give a notification only if this is HOL day. I'm using also the Android version of this library, and I have isYomTovAssurBemelacha() there - which I can't find it here, I only see isYomTov() that returns true even if this is a day that doesn't ASSUR BEMELACHA.
Is there anything I can do to overcome this issue?

Thanks!

Bug in KCJewishCalendar.m -workingDateAdjustedForSunset implementation

Code is:
BOOL isAfterSunset = [[self sunset] timeIntervalSinceNow] < 0;

Which might be correct when testing current time. But when check for future/past time (or running a unit-test) this can lead to an error.
I think it's better to compare to workingDate like the next implementation:

BOOL isAfterSunset = (self.workingDate.timeIntervalSince1970 - [self sunset].timeIntervalSince1970) > 0;

Question: Get hebrew date as string

Hello,
How would I go about getting the hebrew date as a string? The format I would like it in: (month day, year).
I would just have an array of month names, and choose which one based on the "currentHebrewMonth" variable, but the fact that there are several different possible hebrew year lengths makes it a lot more complicated. Thanks!

Framework is Difficult to Integrate into Other Projects

I've been using KosherCocoa as a framework since originally porting it back in 2012. I would just drag my files into the project and compile.

Since then, Apple has allowed third party developers to use dynamically linked frameworks in iOS. Then, we got CocoaPods and Carthage. More recently, Swift Package Manager was introduced.

With Xcode 7, I tried dragging my projects into Xcode and building. That worked for debug builds, but it's been a struggle to get things right when Archiving. I'm opening this issue to track efforts at simplifying the bridging headers and the archive process.

The Translation Issue

If you want to help translation the framework into any one of the languages listed here, please follow these steps:

  1. Jump to the related issue
  2. Assign yourself and leave a note.
  3. Create a folder in /Library/Localizations/ for the two letter code of your language. (For example: he.lproj for Hebrew, ru.lproj for Russian, etc.) If this already exists, skip to step 5.
  4. Copy Localizable.strings from en.lproj into your new folder.
  5. Open the copied file and start translating. The format is "english text"="your translated text";
  6. When you're ready to submit a partial or complete localization, open a PR.

Thanks!

Translate To Hebrew

I want to make KosherCocoa useful to Hebrew speaking users. I don't know nearly enough Hebrew to do this. Here's how you can help:

  1. Assign yourself here and comment below.
  2. Pull down the latest version of feature/123-translate-to-hebrew branch.
  3. Open /Library/Localizations/he.lproj/Localizable.strings
  4. Start translating. The format is "english text"="your translated text"; Please watch out for whitespace around punctuation and %@ format strings.
  5. Commit your changes with git.
  6. When you're ready to submit a partial or complete localization, open a PR. (There's a lot of text, so don't hesitate to submit partial PRs.)

Thank you!

Can't find some properties

Hello!
We migrate to your framework now from MyZmanim API. And your framework has so many different properties! So we need a little help to understand something.
We use some algorithm to understand which chapters of prayer book people should to read in different parts of the day in our app. And to make this algorithm work we used these properties in MyZmanim API: dawn72, minchaGra, nightZalman. All of these properties are dates. There are not all properties we need, but other we have already found.
It will be very cool, if you help us to find these properties in your framework!
Thank you, in advance!

KCParashatHashavuaCalculator

Hi.

I have so say KosherCocoa is amazing.
Just one bug I found in KCParashatHashavuaCalculator.

When i trying to search parsha in israel between 22-29 in Elul this year , my application is about to crush.
I don't know why ,can you help me with that ?

Bug in JewishCalendar

Function tchilasZmanKidushLevana7Days always returning the date: 4167-06-17 00:39:15 UTC.
The function is not available in ComplexZmanimCalendar.

Translate to Portuguese

I want to make KosherCocoa useful to Portuguese speaking users. I don't know nearly enough Portuguese to do this. Here's how you can help:

  1. Assign yourself here and comment below.
  2. Create a folder in /Library/Localizations/ for the two letter code of your language. (pt.lproj for Portuguese)
  3. Copy Localizable.strings from en.lproj into your new folder.
  4. Open the copied file and start translating. The format is "english text"="your translated text";
  5. When you're ready to submit a partial or complete localization, open a PR. (There's a lot of text, so don't hesitate to submit partial PRs.)

Thanks so much!
@natanrolnik, can you help find someone to work on this?

Update comments in `KCNOAACalculator` to match framework

The header comment in some files is using a format inconsistent with the rest of the framework. This issue is about changing the comments to be consistent with the rest of the framework.

Impacted Files

  • KCAstronomicalCalculator.h
  • KCNOAACalculator.h
  • KCNOAACalculator.m

Details

Instead of a series of single line comments, the comment should be a multi-line comment block. For example, this is the ideal format:

/**
 *  KCNOAACalculator.h
 *  KosherCocoa 3
 *
 *  Created by Elyahu on 1/23/23.
 *  Updated by Moshe Berman on 12/29/23.
 *
 *  Use of KosherCocoa 3 is governed by the LGPL 2.1 License.
 */

How To Test

  • Verify the file names and dates are correect after updating the comments.
  • No other automated testing required.

Swift 4.0

Did anyone test this project with a Swift 4.0 project? #121

Translate to Russian

I want to make KosherCocoa useful to Russian users. I don't know nearly enough Russian to do this. Here's how you can help:

  1. Assign yourself here and comment below.
  2. Create a folder in /Library/Localizations/ for the two letter code of your language. (ru.lproj for Russian)
  3. Copy Localizable.strings from en.lproj into your new folder.
  4. Open the copied file and start translating. The format is "english text"="your translated text";
  5. When you're ready to submit a partial or complete localization, open a PR. (There's a lot of text, so don't hesitate to submit partial PRs.)

Thanks so much!

Effects of elevation

This is not a issue with the kosher cocoa lib, however since the kosher cocoa lib also uses elevation to calculate zmanim, I thought you might have a answer to my question.

I put up a web based zmanim api service at https://wyrezmanim.herokuapp.com. Source code is at https://github.com/greatjack1/dotnetcoreZmanim and I wanted to know if I should make elevation be a required parameter when calculating zmanim or not? Does it make a big enough difference that I should force users to add it?

A lot of NSObjCRuntime.h errors

Hi.
Sorry for bothering again. When I add Categories, Cores and Headers file to my project and try to build (without even scripting) I get these errors. When I remove everything, the errors go away. Surely I am doing something wrong using your framework.

Please, any idea?

Thanks!

schermata 2014-07-21 alle 11 34 21
schermata 2014-07-21 alle 11 35 12

Translate to French

I want to make KosherCocoa useful to French speaking users. I don't know nearly enough French to do this. Here's how you can help:

  1. Assign yourself here and comment below.
  2. Check out the branch feature/124-translate-to-french (You might need to create the branch locally before pulling it.)
  3. Open Library/Localizations/fr.lproj/Locacalizable.strings
  4. Start translating. The format is "english text"="your translated text";
  5. When you're ready to submit a partial or complete localization, open a PR. (There's a lot of text, so don't hesitate to submit partial PRs.)

@arytbk, @sousben, do you want to split this up or do either of you wish to contribute?

NOAA Sunrise Calculator?

Hey! I noticed that this library uses the SunTimesCalculator.java file for sunrise and sunset calculations from the KosherJava library. Why was this Algorithm chosen over the default NOAA Algorithm?

Also, is there any plan to include the NOAA Algorithm? Because on the KosherJava website, he writes that the NOAA Algorithm is more accurate. See here: https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/

"As noted above, the degree-based calculations were done using the more accurate Jean Meeus / NOAA algorithms. Seforim printed in the past did not have access to the newer algorithms and typically used the USNO algorithm, but as seen below, there is only a trivial difference between the algorithms."

== NAN does not work as intended.

Hi! I noticed this while using your library. If you use a zman like 26 degrees for tzait in New York on June 14 2023. You are supposed to get nil, however, the library passes over the if statement because you need to use the isnan() method, NOT == NAN. It's a simple fix but tedious.

Bug in KCParashatHashavuaCalculator

Hi first of all thanks for the amazing library
There is a bug in KCParashatHashavuaCalculator
The Parash jump one week forward from 4/07/2015 and crash on 12/09/2015

Thanks alot

help wrong date

Hello! thanks for the library, I was displaying the dates and noticed that the 10.11.2018 and 11.11.2018 on the Jewish calendar, the conclusion of the 3 number

let calendar = JewishCalendar.init(location: location)
for i in 9 ... 12 {
calendar.workingDate = NSDate(day: UInt(i), month: 11, year: 2018)! as Date
calendar.returnsModernHolidays = true
let month = calendar.currentHebrewMonth()
let day = calendar.currentHebrewDayOfMonth()
let year = calendar.currentHebrewYear()
let dayOfWeek = calendar.currentDayOfTheWeek()
print(day,dayOfWeek,month,year)
}

print//
2 6 3 5779
3 7 3 5779
3 1 3 5779
4 2 3 5779

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.