首页 > 编程语言 >C#获取该时间所在月份的最后一天的string(年月日)

C#获取该时间所在月份的最后一天的string(年月日)

时间:2023-02-09 10:33:11浏览次数:37  
标签:string C# 所在 获取 time 年月日



/// <summary>
/// 获取该时间所在月份的最后一天的string(年月日)
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public static string get_last_day_at_parameters_time(this DateTime time) => (time.AddMonths(1).ToString("yyyy-MM") + "-01").to_datetime().AddDays(-1).to_stringxymd();






标签:string,C#,所在,获取,time,年月日
From: https://www.cnblogs.com/IBPM/p/17104355.html

相关文章