标签:day static end ati 获取 stat turn DDM ddd
/// <summary>
/// 获取当前月的月末日期
/// </summary>
/// <returns></returns>
public static DateTime getEndMonth()
{
int span = Convert.ToInt32(System.DateTime.Now.Day);
System.DateTime dateEnd = System.DateTime.Now.AddMonths(1).AddDays(-span);
return dateEnd ;
}
/// <summary>
/// 获取当前月初日期
/// </summary>
/// <returns></returns>
public static DateTime getStartMonth()
{
int span = Convert.ToInt32(System.DateTime.Now.Day);
span = span - 1;
System.DateTime dateStart = System.DateTime.Now.AddDays(-span);
return dateStart ;
}
标签:day static end ati 获取 stat turn DDM ddd
原文地址:https://www.cnblogs.com/fhrfhr/p/12986494.html