You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The zero_range internal function has different behavior for hms and all difftime objects if there is a "midnight" in there aka 00:00:00 hms value.
Simple Example
Let's say a function calculated a range of hms objects and midnight not in there:
range= structure(c(1234, 7380), class="difftime", units="secs")
scales:::zero_range(range)
#> Error in `/.difftime`((x[1] - x[2]), m): second argument of / cannot be a "difftime" object
The use case for this bug is at tidyverse/ggplot2#6134
The
zero_range
internal function has different behavior forhms
and alldifftime
objects if there is a "midnight" in there aka00:00:00
hms value.Simple Example
Let's say a function calculated a range of
hms
objects and midnight not in there:The error happens at
scales/R/bounds.R
Line 397 in 6e5e4c3
m
in this case is adifftime
object.Create a sequence that crosses midnight, range has a
0
in there, so no error.The error is “resolved” because
scales/R/bounds.R
Line 391 in 6e5e4c3
FALSE
.The text was updated successfully, but these errors were encountered: