On 0.5:
julia> dt = DateTime(2000,1,1)
2000-01-01T00:00:00
julia> Dates.format(dt, "s")
"0"
julia> Dates.format(dt, "sss")
"000"
On master
:
julia> dt = DateTime(2000,1,1)
2000-01-01T00:00:00
julia> Dates.format(dt, "s")
"0"
julia> Dates.format(dt, "sss")
"0"
This happens for all trailing zeros, e.g.
julia> Dates.format(DateTime(2000,1,1,0,0,0,10), "sss")
"01"
julia> Dates.format(DateTime(2000,1,1,0,0,0,100), "sss")
"1"
Additional width examples:
for ms in (0, 100, 120)
println(Dates.format(DateTime(2000,1,1,0,0,0,ms), "s"))
println(Dates.format(DateTime(2000,1,1,0,0,0,ms), "ss"))
println(Dates.format(DateTime(2000,1,1,0,0,0,ms), "sss"))
end
On 0.5
0
00
000
1
10
100
12
12
120
On master
:
0
0
0
1
1
1
12
12
12
@quinnj, @omus: can we prevail on one of you to fix this?
I can fix it
Most helpful comment
I can fix it