Skip to content

Why does Span::get_hours() return 295217, but Span::get_days() return 0? #68

Answered by fbstj
azzamsa asked this question in Q&A
Discussion options

You must be logged in to vote

as the line indicates, the age object contains only the 295217h and zero days. you might be looking for the round method to rebalance the object, or the total method to calculate only the days (including fractional parts).

if you're asking why the age object is mostly hours, that is described in the since method documentation

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Comment options

You must be logged in to vote
1 reply
@azzamsa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants