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

added "secondaryFuzzing" support, to allow customized post-processing #310

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

horscroft-swish
Copy link

A common problem we've encountered in our applications is that we sometimes need less granularity in recent dates.

For example, a task assigned for today, noon, needs to be displayed as "Today" rather than "23 minutes from now", since most tasks are time-agnostic.

For our own purposes, I've added support for post-processing by supplying a function as a timeago setting:

$.timeago.settings.secondaryFuzzing = function(element, intendedText, difference) {}

Which then applies necessary post-processing based on things such as element class, difference etc.

I figured it might be a useful use-case for the original codebase.

@halaxa
Copy link

halaxa commented May 30, 2021

This could be very useful. Is there any progress on this? Thanks.

@horscroft-swish
Copy link
Author

horscroft-swish commented May 30, 2021 via email

@halaxa
Copy link

halaxa commented May 30, 2021

I agree :) What about @rmm5t?

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

Successfully merging this pull request may close these issues.

None yet

2 participants