Skip to content

Commit

Permalink
for hustcc#73 in while -> right now
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed Sep 21, 2016
1 parent cde9577 commit 371678b
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ var test_local_dict = function(number, index) {
// number: the timeago / timein number;
// index: the index of array below;
return [
['just now', 'a while'],
['just now', 'right now'],
['%s seconds ago', 'in %s seconds'],
['1 minute ago', 'in 1 minute'],
['%s minutes ago', 'in %s minutes'],
Expand Down
2 changes: 1 addition & 1 deletion dist/timeago.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function () {
// build-in locales: en & zh_CN
locales = {
'en': function(number, index) {
if (index === 0) return ['just now', 'a while'];
if (index === 0) return ['just now', 'right now'];
var unit = indexMapEn[parseInt(index / 2)];
if (number > 1) unit += 's';
return [number + ' ' + unit + ' ago', 'in ' + number + ' ' + unit];
Expand Down
2 changes: 1 addition & 1 deletion dist/timeago.locales.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/timeago.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3>Locales register ?</h3>
// number: the timeago / timein number;
// index: the index of array below;
return [
['just now', 'a while'],
['just now', 'right now'],
['%s seconds ago', 'in %s seconds'],
['1 minute ago', 'in 1 minute'],
['%s minutes ago', 'in %s minutes'],
Expand Down
2 changes: 1 addition & 1 deletion locales/en.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function(number, index) {
return [
['just now', 'a while'],
['just now', 'right now'],
['%s seconds ago', 'in %s seconds'],
['1 minute ago', 'in 1 minute'],
['%s minutes ago', 'in %s minutes'],
Expand Down
2 changes: 1 addition & 1 deletion locales/en_short.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function(number, index) {
return [
['just now', 'a while'],
['just now', 'right now'],
['%ss ago', 'in %ss'],
['1m ago', 'in 1m'],
['%sm ago', 'in %sm'],
Expand Down
2 changes: 1 addition & 1 deletion src/timeago.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function () {
// build-in locales: en & zh_CN
locales = {
'en': function(number, index) {
if (index === 0) return ['just now', 'a while'];
if (index === 0) return ['just now', 'right now'];
var unit = indexMapEn[parseInt(index / 2)];
if (number > 1) unit += 's';
return [number + ' ' + unit + ' ago', 'in ' + number + ' ' + unit];
Expand Down
2 changes: 1 addition & 1 deletion tests/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(t, tb) {
t.equal(tb.subSeconds(10), '10 seconds ago');
t.equal(tb.subSeconds(21), '21 seconds ago');
t.equal(tb.subSeconds(22), '22 seconds ago');
t.equal(tb.addSeconds(1), 'a while');
t.equal(tb.addSeconds(1), 'right now');
t.equal(tb.addSeconds(10), 'in 10 seconds');
t.equal(tb.addSeconds(21), 'in 21 seconds');
t.equal(tb.addSeconds(22), 'in 22 seconds');
Expand Down
2 changes: 1 addition & 1 deletion tests/locales/en_short.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(t, tb) {
t.equal(tb.subSeconds(10), '10s ago');
t.equal(tb.subSeconds(21), '21s ago');
t.equal(tb.subSeconds(22), '22s ago');
t.equal(tb.addSeconds(1), 'a while');
t.equal(tb.addSeconds(1), 'right now');
t.equal(tb.addSeconds(10), 'in 10s');
t.equal(tb.addSeconds(21), 'in 21s');
t.equal(tb.addSeconds(22), 'in 22s');
Expand Down
2 changes: 1 addition & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('timeago.js should be tested', t => {
// test register locale
const timeagoReg = timeago('2016-06-23');
timeago.register('test_local', (number, index) => [
["just xxx", "a while"],
["just xxx", "right now"],
["%s seconds xxx", "in %s seconds"],
["1 minute xxx", "in 1 minute"],
["%s minutes xxx", "in %s minutes"],
Expand Down

0 comments on commit 371678b

Please sign in to comment.