timrwood/moment — Issue #64: fromNow() on dates in the past is wrong
Author: vandrijevik
Created: 2011-11-14 17:33:43+00:00
State: open

Today is 2011-11-14.

var aWhileAgo = moment([2011, 10, 30]);
console.log(aWhileAgo.fromNow());
"in 15 days"

var aWhileAgo = moment([2011, 11, 5]);
console.log(aWhileAgo.fromNow());
"in 20 days"

var aWhileAgo = moment([2010, 11, 5]);
console.log(aWhileAgo.fromNow());
"11 months ago"

var aWhileAgo = moment([2011, 10, 5]);
console.log(aWhileAgo.fromNow());
"10 days ago"

It seems that `fromNow()` is broken for dates in the recent past.