for Push.

This commit is contained in:
nobobo
2026-06-01 13:23:34 +09:00
parent 9e093ea99f
commit a6550e9928
93 changed files with 10393 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KssSmaPlaLib.Commons
{
public static class DateHelperUxer
{
/// <summary>
/// 指定した年と月の末日を返します。
/// </summary>
/// <param name="year">年(例: 2025</param>
/// <param name="month">月(112</param>
/// <returns>末日(2831</returns>
public static bool TryGetLastDayOfMonth(int year, int month, out int matsubi,out string resultMessage)
{
matsubi = -1;
resultMessage = string.Empty;
if (month < 1 || month > 12)
{
resultMessage = "月が1~12の範囲ではありません。";
return false;
}
// DateTime構造体を使って末日を取得
matsubi = DateTime.DaysInMonth(year, month);
return true;
}
}
}