test('from', function (assert) {
var start = moment([2007, 1, 28]);
- assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyyə', '44 seconds = a few seconds');
+ assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyə', '44 seconds = a few seconds');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'bir dəqiqə', '45 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'bir dəqiqə', '89 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), '2 dəqiqə', '90 seconds = 2 minutes');
});
test('suffix', function (assert) {
- assert.equal(moment(30000).from(0), 'birneçə saniyyə sonra', 'prefix');
- assert.equal(moment(0).from(30000), 'birneçə saniyyə əvvəl', 'suffix');
+ assert.equal(moment(30000).from(0), 'birneçə saniyə sonra', 'prefix');
+ assert.equal(moment(0).from(30000), 'birneçə saniyə əvvəl', 'suffix');
});
test('now from now', function (assert) {
- assert.equal(moment().fromNow(), 'birneçə saniyyə əvvəl', 'now from now should display as in the past');
+ assert.equal(moment().fromNow(), 'birneçə saniyə əvvəl', 'now from now should display as in the past');
});
test('fromNow', function (assert) {
- assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyyə sonra', 'in a few seconds');
+ assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyə sonra', 'in a few seconds');
assert.equal(moment().add({d: 5}).fromNow(), '5 gün sonra', 'in 5 days');
});