Instance-specific settings #121

jacaetevha opened this Issue Mar 25, 2013 · 0 comments


None yet
1 participant

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.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