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

Is pillar printing too aggressive? #54

Closed
DavisVaughan opened this issue Jan 29, 2018 · 5 comments
Closed

Is pillar printing too aggressive? #54

DavisVaughan opened this issue Jan 29, 2018 · 5 comments

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Jan 29, 2018

When you have hours, minutes, and seconds it seems like the seconds aren't (ever?) printed. Is this intended? Seems to me that when you have a regular sequence like below, you would want to know what the second is so you could uniquely identify that row.

(tibble 1.4.2, hms 0.4.1 dev)

library(tibble)
library(hms)

tibble(test = hms(seconds = 7200:8500))
#> # A tibble: 1,301 x 1
#>    test  
#>    <time>
#>  1 02:00 
#>  2 02:00 
#>  3 02:00 
#>  4 02:00 
#>  5 02:00 
#>  6 02:00 
#>  7 02:00 
#>  8 02:00 
#>  9 02:00 
#> 10 02:00 
#> # ... with 1,291 more rows

Created on 2018-01-29 by the reprex package (v0.1.1.9000).

@krlmlr
Copy link
Member

krlmlr commented May 23, 2018

Thanks. This is intended, but I don't have a strong opinion. Would you still hide split-seconds in this example?

@DavisVaughan
Copy link
Member Author

I would think showing hours, minutes, and seconds if seconds are available makes sense.

If split-seconds are also there, I was going to suggest following suit with pillar_shaft.POSIXt and print them if the digits.secs option was set, but it does not seem like hms respects that currently, (see format) so I'm not sure what to suggest. I don't feel as strongly about printing split-seconds by default, but some people might at least want an option to print them somehow.

@krlmlr krlmlr closed this as completed in 1b247f5 Jul 14, 2018
@krlmlr
Copy link
Member

krlmlr commented Jul 14, 2018

Thanks for the nudge. I tweaked the formatting logic, let me know if it works for you.

@DavisVaughan
Copy link
Member Author

Sorry for the delay but this looks great now, thanks!

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants