Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/calendars/australia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Australia <: HolidayCalendar
end

Base.:(==)(a1::Australia, a2::Australia) = a1.state == a2.state
Base.hash(a::Australia) = hash(a.state)
Base.hash(a::Australia, h::UInt) = hash(a.state, h)


function isholiday(::AustraliaASX, dt::Dates.Date)
Expand Down
2 changes: 1 addition & 1 deletion src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mutable struct GenericHolidayCalendar <: HolidayCalendar
end

Base.:(==)(g1::GenericHolidayCalendar, g2::GenericHolidayCalendar) = g1.holidays == g2.holidays && g1.dtmin == g2.dtmin && g1.dtmax == g2.dtmax
Base.hash(g::GenericHolidayCalendar) = hash(g.holidays) + hash(g.dtmin) + hash(g.dtmax)
Base.hash(g::GenericHolidayCalendar, h::UInt) = hash(g.dtmax, hash(g.dtmin, hash(g.holidays, h)))

"""
GenericHolidayCalendar(holidays, [dtmin], [dtmax], [_initcache_])
Expand Down