首页 > 代码库 > 今天倒数时间

今天倒数时间

        Debug.Log(DateTime.Now);        Debug.Log(DateTime.Now.AddDays(1));        DateTime dt = new DateTime(DateTime.Now.Year , DateTime.Now.Month, DateTime.Now.AddDays(1).Day , 0, 0, 0);        TimeSpan span = dt - DateTime.Now;        Debug.Log(span.TotalHours.ToString("00"));        Debug.Log((span.TotalMinutes % 60).ToString("00") );        string nextTime = span.TotalHours.ToString("0") + ":" + (span.TotalMinutes % 60).ToString("0");        Debug.Log(nextTime);

 

今天倒数时间