Skip to content

Commit

Permalink
another bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Elyahu41 committed May 7, 2024
1 parent 8137255 commit bfe64d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion KosherSwiftNew.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "KosherSwiftNew"
spec.version = "1.0.6"
spec.version = "1.0.7"
spec.summary = "KosherJava Zmanim API / Library ported to Swift."

spec.description = "This Zmanim library is an API for a specialized calendar that can calculate different astronomical times including sunrise and sunset and Jewish zmanim or religious times for prayers and other Jewish religious duties.
Expand Down
2 changes: 1 addition & 1 deletion Sources/KosherSwift/util/GeoLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public class GeoLocation {
}

public func toRadians(degrees:Double) -> Double {
return Double.pi / 180.0
return degrees * Double.pi / 180.0
}

public func toDegrees(radians:Double) -> Double {
Expand Down
8 changes: 8 additions & 0 deletions Tests/KosherSwiftTests/KosherSwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ class KosherSwiftTests: XCTestCase {
XCTAssertEqual(hebrewDateFormatter.formatDayOfWeek(jewishCalendar: jewishCalendar), "Tuesday")
}

func testRhumbLineBearing() {
let denver = GeoLocation(locationName: "Denver", latitude: 39.6272082, longitude: -104.8800718, timeZone: TimeZone.current)
let jer = GeoLocation(locationName: "Jerusalem", latitude: 31.778015, longitude: 35.235413, timeZone: TimeZone.current)

let bearing = denver.getRhumbLineBearing(location: jer)
XCTAssertEqual(bearing, 93.9525489160192)
}

func testDafYomis() {
jewishCalendar.setGregorianDate(year: 2023, month: 12, dayOfMonth: 21)
var dafYomi = jewishCalendar.getDafYomiBavli()
Expand Down

0 comments on commit bfe64d8

Please sign in to comment.