Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative durations are displayed as positive #719

Closed
jfritzemeier opened this issue Sep 24, 2018 · 1 comment
Closed

Negative durations are displayed as positive #719

jfritzemeier opened this issue Sep 24, 2018 · 1 comment
Labels

Comments

@jfritzemeier
Copy link

@jfritzemeier jfritzemeier commented Sep 24, 2018

Title says it all (sry for the bad formatting):

x
[1] "47s" "221s (~3.68 minutes)" "31s"
[4] "7s" "791s (~13.18 minutes)" "29s"
dput(x)
new("Duration", .Data = c(47, -221, 31, 7, -791, 29))

Here the -221 seconds are displayed as ~3.68 minutes. There is no clue that this is actually negative. This is a major issue when debugging. Especially when doing comparisons like:

x <= dseconds(59)

hglanz added a commit to hglanz/lubridate that referenced this issue Jan 19, 2019
@hglanz

This comment has been minimized.

Copy link

@hglanz hglanz commented Jan 19, 2019

I am working on this for Tidyverse Dev Day 2019

hglanz added a commit to hglanz/lubridate that referenced this issue Jan 20, 2019
…h negative values

Negative durations were not being printed properly; they looked positive. This one line addition prepends a negative sign to durations created from negative values.

When the package is tested I get 4 failures, but I get these same 4 failures with no changes to the package code. So, I'm unsure how to resolve this.
hglanz added a commit to hglanz/lubridate that referenced this issue Jan 20, 2019
@hadley hadley added bug wip labels Nov 19, 2019
@vspinu vspinu closed this in 6675469 Dec 7, 2019
vspinu added a commit that referenced this issue Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.