DateTime.DaysInMonth メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim year As Integer Dim month As Integer Dim returnValue As Integer returnValue = DateTime.DaysInMonth(year, month)
- year
年。
指定した year の month の日数。 たとえば、month が 2 月を表す 2 に等しい場合、戻り値には、year が閏年かどうかによって 28 または 29 を返します。


Const July As Integer = 7 Const Feb As Integer = 2 ' daysInJuly gets 31. Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001, July) ' daysInFeb gets 28 because the year 1998 was not a leap year. Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998, Feb) ' daysInFebLeap gets 29 because the year 1996 was a leap year. Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996, Feb)
const int July = 7; const int Feb = 2; // daysInJuly gets 31. int daysInJuly = System.DateTime.DaysInMonth(2001, July); // daysInFeb gets 28 because the year 1998 was not a leap year. int daysInFeb = System.DateTime.DaysInMonth(1998, Feb); // daysInFebLeap gets 29 because the year 1996 was a leap year. int daysInFebLeap = System.DateTime.DaysInMonth(1996, Feb);
const int July = 7; const int Feb = 2; // daysInJuly gets 31. int daysInJuly = System::DateTime::DaysInMonth( 2001, July ); // daysInFeb gets 28 because the year 1998 was not a leap year. int daysInFeb = System::DateTime::DaysInMonth( 1998, Feb ); // daysInFebLeap gets 29 because the year 1996 was a leap year. int daysInFebLeap = System::DateTime::DaysInMonth( 1996, Feb );
final int july = 7; final int feb = 2; // daysInJuly gets 31. int daysInJuly = System.DateTime.DaysInMonth(2001, july); // daysInFeb gets 28 because the year 1998 was not a leap year. int daysInFeb = System.DateTime.DaysInMonth(1998, feb); // daysInFebLeap gets 29 because the year 1996 was a leap year. int daysInFebLeap = System.DateTime.DaysInMonth(1996, feb);

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDateTime.DaysInMonth メソッドを検索する場合は、下記のリンクをクリックしてください。

- DateTime.DaysInMonth メソッドのページへのリンク