Relative dates in words Given a specific date, have the code output a relative reference:


If the date entered is ahead of the current date, express as "x days from now" or "x weeks, y days from now", or "x years, y weeks, z days from now". Zero units need not be mentioned.
If the date is the current simply have it output "Today"
If the date entered is earlier than the current date, express as "x days ago" or "x weeks, y days ago", or "x years, y weeks, z days ago". Zero units need not be mentioned.


Smallest solutions are the winners here...

Good luck!
R, 102, 98

(kinda cheating: literal interpretation of the question)

cat(if(x&lt;-as.Date(readline())-Sys.Date())c(abs(x),"days",c("from now","ago")[(x&lt;0)+1])else"today")


Examples:

2013-12-08
today

2010-01-13
1425 days ago

2015-12-2
724 days from now