mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-23 07:47:54 -05:00
Added docs for "allowPast" setting.
This commit is contained in:
parent
9d6c2c6b64
commit
d0e161a164
1 changed files with 9 additions and 0 deletions
|
@ -116,6 +116,15 @@ jQuery.timeago(jQuery("abbr#some_id")); //=> "<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.
|
||||
|
|
Loading…
Reference in a new issue