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 it possible to change how timeAgoSinceDate works with a parameter? #272

Open
jlubeck opened this issue Sep 18, 2018 · 2 comments
Open

Comments

@jlubeck
Copy link
Contributor

jlubeck commented Sep 18, 2018

Hi! Thanks a lot for this library, I've used it in countless projects!

But now I got a specific requirement. When using timeAgoSinceDate, I need to make the switch between minutes and hours after 120 minutes instead of the current 60 mins.

Ex: Now, if the difference is 70 minutes, it currently displays "1 hour ago"

I'd like for it to display 70 minutes ago. And only start with hours after the 2hr hit.

Is that possible?

Thanks!

@jlubeck
Copy link
Contributor Author

jlubeck commented Sep 18, 2018

Mmm... looking at the source code, looks like it's not currently possible. More than willing to do it myself, would a pull request for this be accepted?

@jlubeck
Copy link
Contributor Author

jlubeck commented Sep 18, 2018

Ok, not sure if it's the best way to do it, but just sent a pull request that handles this...

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

1 participant