Periods
AstroTime.Periods.Period
— TypePeriod{U, T}(unit, Δt) where {U<:TimeUnit, T}
A Period
object represents a time interval of Δt
with a TimeUnit
of unit
. Periods should be constructed via the shorthand syntax shown in the examples below.
Examples
julia> 3.0seconds
3.0 seconds
julia> 1.0minutes
1.0 minutes
julia> 12hours
12 hours
julia> days_per_year = 365
365
julia> days_per_year * days
365 days
julia> 10.0years
10.0 years
julia> 1centuries
1 century
AstroTime.Periods.TimeUnit
— TypeAll time units are subtypes of the abstract type TimeUnit
. The following time units are defined:
Second
Minute
Hour
Day
Year
Century