Skip to content

Commit

Permalink
more bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Elyahu41 committed Dec 25, 2023
1 parent 4a8ec01 commit 8feb0f1
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 249 deletions.
8 changes: 5 additions & 3 deletions KosherSwift/AstronomicalCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ public class AstronomicalCalendar {
* @param time
* the start time
* @param offset
* the offset in seconds to add to the time.
* @return the {@link Date} with the offset in seconds added to it
* the offset in milliseconds to add to the time.
* @return the {@link Date} with the offset in milliseconds added to it
*/
public static func getTimeOffset(time:Date?, offset:Int64) -> Date? {
if (time == nil || offset == Int64.min) {
Expand Down Expand Up @@ -498,10 +498,12 @@ public class AstronomicalCalendar {
if sunTransit == nil || sunTransitTomorrow == nil {
return nil
}

let offset = ((sunTransitTomorrow!.timeIntervalSince1970 - sunTransit!.timeIntervalSince1970) / 2) * 1000

return AstronomicalCalendar.getTimeOffset(
time: sunTransit,
offset: (sunTransitTomorrow!.timeIntervalSince1970 - sunTransit!.timeIntervalSince1970) / 2)
offset: offset)
}

/**
Expand Down
Loading

0 comments on commit 8feb0f1

Please sign in to comment.