Use getFullYear instead of deprecated getYear.

This commit is contained in:
ccd0 2019-08-11 20:14:18 -07:00
parent b2405d88a7
commit 1562c4fe0a

View File

@ -31,7 +31,7 @@ RelativeDates =
# diff is milliseconds from now.
relative: (diff, now, date, abbrev) ->
unit = if (number = (diff / $.DAY)) >= 1
years = now.getYear() - date.getYear()
years = now.getFullYear() - date.getFullYear()
months = now.getMonth() - date.getMonth()
days = now.getDate() - date.getDate()
if years > 1