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

Instance-specific settings #121

Open
jacaetevha opened this issue Mar 25, 2013 · 0 comments
Open

Instance-specific settings #121

jacaetevha opened this issue Mar 25, 2013 · 0 comments

Comments

@jacaetevha
Copy link

It would be very useful to allow for instance-specific settings. As it is, we have to override the default settings, instantiate our timeagos, and then reset the default settings.

I'd like to do:

$.timeago(allowFuture: true, strings.suffixFromNow: 'remaining')

but I'm currently doing:

futureOrNot = $.timeago.settings.allowFuture
suffixFromNow = $.timeago.settings.strings.suffixFromNow
$.timeago.settings.allowFuture = true
$.timeago.settings.strings.suffixFromNow = 'remaining'
$.timeago()
$.timeago.settings.allowFuture = futureOrNot
$.timeago.settings.strings.suffixFromNow = suffixFromNow
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