diff --git a/Project.toml b/Project.toml index c144cf50..7ae9d839 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimateBase" uuid = "35604d93-0fb8-4872-9436-495b01d137e2" authors = ["Datseris ", "Philippe Roy "] -version = "0.10.0" +version = "0.10.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/physical_dimensions/temporal.jl b/src/physical_dimensions/temporal.jl index 0c7dece3..a7a046d5 100644 --- a/src/physical_dimensions/temporal.jl +++ b/src/physical_dimensions/temporal.jl @@ -168,13 +168,15 @@ function time_in_days(t::AbstractArray{<:TimeType}, T = Float32) ts = temporal_sampling(t) if ts == :monthly truetime = daysinmonth.(t) - r = T.(cumsum(truetime)) + return r = T.(cumsum(truetime)) elseif ts == :yearly - error("Todo!") + truetime = daysinmonth.(t) + return r = T.(cumsum(truetime)) elseif ts == :daily return T.(1:length(t)) + else + error("Don't know how to find days for sampling $(ts)") end - return r end #########################################################################