新增GetStartOfToday获取当天开始时间
This commit is contained in:
parent
b90a22ac6e
commit
5b7a438725
|
@ -32,6 +32,14 @@ namespace Falcon.SugarApi
|
|||
throw new NotSupportedException("不支持这个日期查询");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当天的开始时间
|
||||
/// </summary>
|
||||
/// <param name="date">当天时间</param>
|
||||
/// <returns>当天开始时间</returns>
|
||||
public static DateTime GetStartOfToday(this DateTime date) {
|
||||
return new DateTime(date.Year,date.Month,date.Day,0,0,0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回本周的第一天的日期。默认星期一为第一天
|
||||
|
|
Loading…
Reference in New Issue
Block a user