📅  最后修改于: 2022-03-11 14:49:20.249000             🧑  作者: Mango
DateTime date = ...
var firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
var lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1);