9 private const int HOUR = 3600;
11 private const int DAY = 86400;
13 private const int MONTH = 2592000;
17 TimeSpan timeSpan =
new TimeSpan(DateTime.UtcNow.Ticks - time);
18 double num = Math.Abs(timeSpan.TotalSeconds);
21 if (timeSpan.Seconds != 1)
23 return timeSpan.Seconds +
" seconds ago";
25 return "one second ago";
29 return "a minute ago";
33 return timeSpan.Minutes +
" minutes ago";
41 return timeSpan.Hours +
" hours ago";
49 return timeSpan.Days +
" days ago";
53 int num2 = Convert.ToInt32(Math.Floor((
double)timeSpan.Days / 30.0));
56 return num2 +
" months ago";
58 return "one month ago";
60 int num3 = Convert.ToInt32(Math.Floor((
double)timeSpan.Days / 365.0));
63 return num3 +
" years ago";
65 return "one year ago";
static string GetLastTime(long time)