-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
datesDates, times, and the Dates stdlib moduleDates, times, and the Dates stdlib moduledocsThis change adds or pertains to documentationThis change adds or pertains to documentation
Description
Normal behaviour with second precision:
x_min = DateTime("2016-02-22T16:14:39")
x_max = DateTime("2016-02-22T20:23:51")
x_span = x_max-x_min
println(x_span)
y = x_span/20.0
println(y)
14952000 milliseconds
747600 milliseconds
Behaviour if date times have sub-second precision:
x_min = DateTime("2016-02-22T15:38:45.234")
x_max = DateTime("2016-02-22T19:27:35.363")
x_span = x_max-x_min
println(x_span)
y = x_span/20.0
println(y)
13730129 milliseconds
LoadError: InexactError()
while loading In[51], in expression starting on line 7
in / at dates/periods.jl:49
Metadata
Metadata
Assignees
Labels
datesDates, times, and the Dates stdlib moduleDates, times, and the Dates stdlib moduledocsThis change adds or pertains to documentationThis change adds or pertains to documentation