Skip to content

Commit

Permalink
Dates guess (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Rorvik <christian.rorvik@gmail.com>
  • Loading branch information
dantaras and ancapdev committed Nov 8, 2021
1 parent 2587643 commit 885283e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/UnixTimes.jl
Expand Up @@ -83,6 +83,8 @@ function Base.floor(x::UnixTime, p::Union{DatePeriod, TimePeriod})
convert(UnixTime, floor(convert(DateTime, x), p))
end

Dates.guess(a::UnixTime, b::UnixTime, c) = guess(DateTime(a), DateTime(b), c)

Dates.default_format(::Type{UnixTime}) = nothing
Dates.format(x::UnixTime, fmt::Nothing) = string(x)

Expand Down

0 comments on commit 885283e

Please sign in to comment.