Only show Days Ago?
lightninglu10 opened this issue · comments
Patrick Lu commented
Is there a way to only show timeago in days? It's hard for me to parse the documentation and it's not clear whether gradation should be used and how it should be used.
Patrick Lu commented
For anyone who stumbles across this, just figured out that you have to specify factor:
let timeAgoComponents = timeAgo.format(
new Date(this.props.lastActivityAt), {
flavour: 'short',
gradation: [
{
factor: 86400,
unit: 'day',
},
]
});