Skip to content

Commit

Permalink
Add comment for eval function
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Dec 15, 2023
1 parent 9410c6e commit 920bb9e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 920bb9e

Please sign in to comment.