mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-04-05 09:10:09 -04:00
Compare commits
11 commits
Author | SHA1 | Date | |
---|---|---|---|
|
b5a364d3a2 | ||
|
05a85b77f9 | ||
|
0d2a2145b2 | ||
|
0399e804db | ||
|
98d000543c | ||
|
c8b5b9365c | ||
|
14ff438930 | ||
|
2409c9f88d | ||
|
74736c8d07 | ||
|
4af2cf7135 | ||
|
f7c9c359cd |
6 changed files with 54 additions and 25 deletions
|
@ -4,10 +4,26 @@ Timeago is a jQuery plugin that makes it easy to support automatically updating
|
|||
fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601
|
||||
formatted dates and times embedded in your HTML (à la microformats).
|
||||
|
||||
**If you like this project, please help by donating.**
|
||||
## How You Can Help
|
||||
|
||||
* Gittip: https://www.gittip.com/rmm5t/
|
||||
* Bitcoin: `1wzBnMjWVZfpiFMc5i2nzKT7sCBaZNfLK`
|
||||
**If you like this project, please help. [Donate via Gittip][gittip] or [buy me a coffee with Bitcoin][bitcoin].**<br>
|
||||
[][gittip]
|
||||
[][bitcoin]
|
||||
|
||||
**[Bitcoin][bitcoin]**: `1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m`<br>
|
||||
[![Bitcoin Donation][bitcoin-qr-small]][bitcoin-qr-big]
|
||||
|
||||
## Need Help?
|
||||
|
||||
**You can [book a session with me on Codementor][codementor].**<br>
|
||||
[][codementor]
|
||||
|
||||
[gittip]: https://www.gittip.com/rmm5t/ "Donate to rmm5t for open source!"
|
||||
[bitcoin]: https://blockchain.info/address/1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m "Buy rmm5t a coffee for open source!"
|
||||
[bitcoin-scheme]: bitcoin:1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m?amount=0.01&label=Coffee%20to%20rmm5t%20for%20Open%20Source "Buy rmm5t a coffee for open source!"
|
||||
[bitcoin-qr-small]: http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
|
||||
[bitcoin-qr-big]: http://chart.apis.google.com/chart?cht=qr&chs=500x500&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
|
||||
[codementor]: https://www.codementor.io/rmm5t?utm_campaign=profile&utm_source=button-rmm5t&utm_medium=shields "Book a session with rmm5t on Codementor!"
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -175,6 +175,13 @@
|
|||
};
|
||||
|
||||
function refresh() {
|
||||
//check if it's still visible
|
||||
if(!$.contains(document.documentElement,this)){
|
||||
//stop if it has been removed
|
||||
$(this).timeago("dispose");
|
||||
return this;
|
||||
}
|
||||
|
||||
var data = prepareData(this);
|
||||
var $s = $t.settings;
|
||||
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
// Czech
|
||||
jQuery.timeago.settings.strings = {
|
||||
prefixAgo: "před",
|
||||
prefixFromNow: null,
|
||||
suffixAgo: null,
|
||||
suffixFromNow: null,
|
||||
seconds: "méně než minutou",
|
||||
minute: "minutou",
|
||||
minutes: "%d minutami",
|
||||
hour: "hodinou",
|
||||
hours: "%d hodinami",
|
||||
day: "1 dnem",
|
||||
days: "%d dny",
|
||||
month: "1 měsícem",
|
||||
months: "%d měsíci",
|
||||
year: "1 rokem",
|
||||
years: "%d roky"
|
||||
};
|
||||
(function() {
|
||||
function f(n, d, a) {
|
||||
return a[d>=0 ? 0 : a.length==2 || n<5 ? 1 : 2];
|
||||
}
|
||||
|
||||
jQuery.timeago.settings.strings = {
|
||||
prefixAgo: 'před',
|
||||
prefixFromNow: 'za',
|
||||
suffixAgo: null,
|
||||
suffixFromNow: null,
|
||||
seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu'])},
|
||||
minute: function(n, d) {return f(n, d, ['minutou', 'minutu'])},
|
||||
minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut'])},
|
||||
hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu'])},
|
||||
hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin'])},
|
||||
day: function(n, d) {return f(n, d, ['%d dnem', '%d den'])},
|
||||
days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní'])},
|
||||
month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc'])},
|
||||
months: function(n, d) {return f(n, d, ['%d měsící', '%d měsíce', '%d měsíců'])},
|
||||
year: function(n, d) {return f(n, d, ['%d rokem', '%d rok'])},
|
||||
years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let'])}
|
||||
};
|
||||
})();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Romanian
|
||||
$.timeago.settings.strings = {
|
||||
jQuery.timeago.settings.strings = {
|
||||
prefixAgo: "acum",
|
||||
prefixFromNow: "in timp de",
|
||||
suffixAgo: "",
|
||||
|
@ -15,4 +15,4 @@ $.timeago.settings.strings = {
|
|||
months: "%d luni",
|
||||
year: "un an",
|
||||
years: "%d ani"
|
||||
};
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
months: function (value) {
|
||||
return numpf(value, "%d mesec", "%d meseca", "%d meseci");
|
||||
},
|
||||
year: "pre godinu dana",
|
||||
year: "godinu dana",
|
||||
years: function (value) {
|
||||
return numpf(value, "%d godinu", "%d godine", "%d godina");
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Turkish
|
||||
jQuery.extend($.timeago.settings.strings, {
|
||||
jQuery.timeago.settings.strings = {
|
||||
suffixAgo: 'önce',
|
||||
suffixFromNow: null,
|
||||
seconds: '1 dakikadan',
|
||||
|
@ -13,4 +13,4 @@ jQuery.extend($.timeago.settings.strings, {
|
|||
months: '%d ay',
|
||||
year: '1 yıl',
|
||||
years: '%d yıl'
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue