Beispiel #1
0
 /// <summary>
 /// 年龄
 /// </summary>
 /// <param name="dt"></param>
 /// <returns></returns>
 public static int Age(this DateTime?dt)
 {
     return(SystemHelper.Age(dt, DateTime.Now));
 }
Beispiel #2
0
 /// <summary>
 /// 格式化日期 yyyy-MM-dd
 /// </summary>
 /// <param name="dt"></param>
 /// <returns></returns>
 public static string Format(this DateTime dt)
 {
     return(SystemHelper.Format(dt, "yyyy-MM-dd"));
 }