Skip to content

Commit

Permalink
fix nanodate.jl to use cs
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySarnoff authored May 12, 2023
1 parent fdba09e commit 4aba47d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nanodate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NanoDate(dt::DateTime, cs::Microsecond) = NanoDate(dt, Nanosecond(value(cs) * 1_
NanoDate(dt::DateTime, cs::Microsecond, ns::Nanosecond) =
NanoDate(dt, nanosecs(cs, ns))

NanoDate(dt::Date, cs::Microsecond, ns::Nanosecond) = NanoDate(DateTime(dt), μs, ns)
NanoDate(dt::Date, cs::Microsecond, ns::Nanosecond) = NanoDate(DateTime(dt), cs, ns)
NanoDate(dt::Date, cs::Microsecond) = NanoDate(DateTime(dt), cs)
NanoDate(dt::Date, ns::Nanosecond) = NanoDate(DateTime(dt), ns)

Expand Down Expand Up @@ -114,9 +114,9 @@ nanosecs(ms::Millisecond, cs::Microsecond, ns::Nanosecond) = Nanosecond(1_000_00
@inline nanosecs(cs::Microsecond, ns::Nanosecond) = nanosecs(value(cs), value(ns))

NanoDate(dt::DateTime, x) = NanoDate(dt, nanosecs(x))
NanoDate(dt::DateTime, μs, ns) = NanoDate(dt, nanosecs(cs, ns))
NanoDate(dt::DateTime, cs, ns) = NanoDate(dt, nanosecs(cs, ns))
NanoDate(d::Date, x) = NanoDate(d, nanosecs(x))
NanoDate(d::Date, μs, ns) = NanoDate(d, nanosecs(cs, ns))
NanoDate(d::Date, cs, ns) = NanoDate(d, nanosecs(cs, ns))

NanoDate(dy::Day, ns::Nanosecond) = NanoDate(Date(UTD(dy)), ns)
NanoDate(dy::Day, cs::Microsecond) = NanoDate(Date(UTD(dy)), nanosecs(cs))
Expand Down

0 comments on commit 4aba47d

Please sign in to comment.