Added docs for "allowPast" setting.

This commit is contained in:
Rich Hildebrand 2014-02-25 13:53:50 -05:00
parent 9d6c2c6b64
commit d0e161a164

View file

@ -116,6 +116,15 @@ jQuery.timeago(jQuery("abbr#some_id")); //=> &quot;<span id="prog_element"></spa
<pre>
jQuery.timeago.settings.allowFuture = true;</pre>
<p class="how">
To disable timestamps in the past, use the <tt>allowPast</tt> setting.
This setting is set to true by default. When set to false, if the time is in the past then instead of displaying a message like "5 minutes ago" a static message will be displayed.
The staic message displayed can be configured with the <tt>strings.inPast</tt> setting:
</p>
<pre>
jQuery.timeago.settings.strings.inPast = "time has elapsed";
jQuery.timeago.settings.allowPast = false;</pre>
<h3>Excusez-moi?</h3>
<p>
Yes, timeago has locale/i18n/language support. Here are some <a href="https://github.com/rmm5t/jquery-timeago/tree/master/locales">configuration examples</a>. Please submit a <a href="https://github.com/rmm5t/jquery-timeago">GitHub pull request</a> for corrections or additional languages.