摘要: public static string GetRelatedDateTime(object dateTime) { TimeSpan timeSpan = DateTime.Now - Convert.ToDateTime(dateTime); if (timeSpan.Days > 0) { return timeSpan.Days + "天以前"; } if (timeSpan.Hours > 0) { return timeSpan.Hours + "小时以前"; } return timeSpan.Minutes + "分 阅读全文
posted @ 2012-02-24 11:09 周正明 阅读(413) 评论(0) 推荐(0) 编辑