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

Approximate "years ago" instead of truncating in HumanTime class #9

Open
lvps opened this issue Oct 22, 2018 · 1 comment
Open

Approximate "years ago" instead of truncating in HumanTime class #9

lvps opened this issue Oct 22, 2018 · 1 comment

Comments

@lvps
Copy link
Collaborator

lvps commented Oct 22, 2018

"1 year ago" for events that happened 23 months ago is a bit out of place asd

@valerio-bozzolan
Copy link
Owner

The involved part is here:

// We are human
if( $d > 200 ) {
$y++;
}
if( $y > 1 ) {
return sprintf( __("%d anni"), $y );
}
if( $y === 1 ) {
return __("un anno");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants