From 920bb9e0e07dfe478e18a16ab6f9575edf215838 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Fri, 15 Dec 2023 09:18:40 -0500 Subject: [PATCH] Add comment for eval function --- src/utils/utilities.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/utilities.jl b/src/utils/utilities.jl index 1d2a5ca6be4..2e9c9fb68ef 100644 --- a/src/utils/utilities.jl +++ b/src/utils/utilities.jl @@ -213,6 +213,14 @@ end import Dates time_per_time(::Type{P}, ::Type{P}) where {P} = 1 +#= + define_time_per_times(periods) + +Evals `time_per_time(::Type{<:Dates.Period},::Type{<:Dates.Period})` +for `Nanosecond, Microsecond, Millisecond, Second, Minute, Hour, Day, Week` +in a triangular fashion-- `time_per_time` provides the conversion factor +(e.g., `Nanosecond`s per `Second`) and all larger periods (but not smaller ones). +=# function define_time_per_times(periods) for i in eachindex(periods) T, n = periods[i]