(with the understanding that I do not recommend this, you can experiment)
using Base.Dates
function Base.:(*)(x::AbstractFloat, p::Period)
n = Nanosecond(p)
y = x * n.value
nanos = floor(Int64, y)
micros, nanos = fldmod(nanos, 1000)
millis, micros = fldmod(micros, 1000)
secs, millis = fldmod(millis, 1000)
mins, secs = fldmod(secs, 60)
hrs, mins = fldmod(mins, 60)
dys, hrs = fldmod(hrs, 24)
result = Nanosecond(nanos) + Microsecond(micros) +
Millisecond(millis) + Second(secs) +
Minute(mins) + Hour(hrs) + Day(dys)
return result
end
julia> 1.5 * Second(1)
1 second, 500 milliseconds
julia> sqrt(2) * Day(5)
7 days, 1 hour, 42 minutes, 20 seconds, 258 milliseconds, 945 microseconds, 177 nanoseconds