You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace GDZZ.Application.Help
|
|
|
|
|
{
|
|
|
|
|
public class Utils
|
|
|
|
|
{
|
|
|
|
|
public static bool ShowHelp(DateTime date)
|
|
|
|
|
{
|
|
|
|
|
bool isTheDay = false;
|
|
|
|
|
//判断日期是否是当天
|
|
|
|
|
DateTime time = DateTime.Now;//当天
|
|
|
|
|
DateTime time2 = new DateTime(time.Year, time.Month, time.Day);//当天的零时零分
|
|
|
|
|
DateTime time3 = time.AddDays(1);//后一天
|
|
|
|
|
DateTime time4 = new DateTime(time3.Year, time3.Month, time3.Day);//后一天的零时零分
|
|
|
|
|
|
|
|
|
|
if (date > time2 && date < time4)
|
|
|
|
|
{
|
|
|
|
|
isTheDay = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
isTheDay = false;
|
|
|
|
|
}
|
|
|
|
|
return isTheDay;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|