Commit 02976493 authored by opentable fetcher's avatar opentable fetcher
Browse files

fixing bugs

parent b488aaff
......@@ -16,4 +16,7 @@ import Base.:<
import Base.checkindex
checkindex(::Type{Bool}, inds::AbstractUnitRange, p::AbstractPeriod) = checkindex(Bool, inds, p.ordinal)
import Base.isless
isless(p1::AbstractPeriod, p2::AbstractPeriod) = p1.ordinal < p2.ordinal
end # module
......@@ -9,7 +9,7 @@ function Period(arg1::Integer, frequency::Frequency)
if frequency == Year
ordinal = arg1 - 19070
elseif frequency == Undated
ordinal - arg1
ordinal = arg1
else
error("Frequency $frequency needs more than one argument")
end
......@@ -36,7 +36,7 @@ function Period(arg1::Integer, arg2::Integer, frequency::Frequency)
Period(ordinal, frequency)
end
function Period(arg1, arg2, arg3, frequency)
function Period(arg1::Integer, arg2::Integer, arg3::Integer, frequency::Frequency)
if frequency == Day
return Period(arg1, arg2, arg3)
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment