Skip to content

Commit

Permalink
fixed taanis esther issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Smith committed Jan 22, 2024
1 parent b84fc3b commit 19e059e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion KosherSwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'KosherSwift'
s.version = '2.1.10'
s.version = '2.1.11'
s.summary = 'A Swift library for getting zmanim.'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion Sources/KosherSwift/HebrewCalendar/JewishCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public class JewishCalendar: JewishDate {
public var isChanukah: Bool { (month == .kislev && day >= 25) || (month == .teves && ((day == 1 || day == 2) || (day == 3 && isKislevShort)))}
public var isTenthOfTeves: Bool { month == .teves && day == 10 }
public var isTuBeshvat: Bool { month == .shevat && day == 15 }
public var isFastOfEsther: Bool { (!isJewishLeapYear && month == .adar && ((day == 11 || day == 12) && dow == .thursday) || (day == 13 && !(dow == .friday || dow == .saturday))) || (isJewishLeapYear && month == .adar2 && (((day == 11 || day == 12) && dow == .thursday) || (day == 13 && !(dow == .friday || dow == .saturday)))) }
public var isFastOfEsther: Bool { (month == .adar && (((day == 11 || day == 12) && dow == .thursday) || (day == 13 && !(dow == .friday || dow == .saturday)))) || (isJewishLeapYear && month == .adar2 && (((day == 11 || day == 12) && dow == .thursday) || (day == 13 && !(dow == .friday || dow == .saturday)))) }
public var isPurim: Bool { (!isJewishLeapYear && month == .adar && day == 14) || (isJewishLeapYear && month == .adar2 && day == 14) }
public var isShushanPurim: Bool { (!isJewishLeapYear && month == .adar && day == 15) || (isJewishLeapYear && month == .adar2 && day == 15) }
public var isPurimKatan: Bool { isJewishLeapYear && month == .adar && day == 14 }
Expand Down
7 changes: 6 additions & 1 deletion Tests/KosherSwiftTests/KosherSwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ final class KosherSwiftTests: XCTestCase {
checkTimeEquals(cal.candleLighting(), 17, 35)

cal = ComplexZmanimCalendar(location: loc, date: Date(year: 2024, month: 1, day: 16).next(.friday))
checkTimeEquals(cal.candleLighting(), 17, 35)
checkTimeEquals(cal.candleLighting(), 17, 40)
}

func testFastOfEsther() {
let cal = JewishCalendar(date: Date(year: 2024, month: 1, day: 23), isInIsrael: false)
XCTAssert(!cal.isFastOfEsther)
}
}

0 comments on commit 19e059e

Please sign in to comment.