EastAsianLunisolarCalendar.AddMonths メソッド
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Dim instance As EastAsianLunisolarCalendar Dim time As DateTime Dim months As Integer Dim returnValue As DateTime returnValue = instance.AddMonths(time, months)
- months
加算する月の数。
time パラメータに指定した月数を加算した結果の新しい DateTime オブジェクト。
結果として得られる日が、結果の年の結果の月に対して有効な日でない場合は、結果として得られる DateTime オブジェクトの日付部分が影響を受けます。この場合、この日付は、結果の年の結果の月で有効な最後の日付に変更されます。結果として得られる月が、指定した DateTime オブジェクトの年の範囲外の場合、結果として得られる DateTime オブジェクトの年の部分に影響します。この実装では現在の時代 (年号) だけをサポートしています。したがって、結果として得られた年が、指定された DateTime オブジェクトの時代 (年号) の範囲外の場合、ArgumentException がスローされます。結果として得られる DateTime オブジェクトの時刻の部分は、指定した DateTime オブジェクトの値と同じままです。
たとえば、指定した月が 31 日まである 10 月で、指定した日がその月の 31 番目の日であり、months パラメータの値が 6 の場合、結果として得られる年は指定した年より 1 大きい年、月は 4 月、日は 4 月の最終日である 30 日になります。
months パラメータの値が負の場合、結果の DateTime オブジェクトは、指定した DateTime オブジェクトよりも前の値になります。
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- EastAsianLunisolarCalendar.AddMonths メソッドのページへのリンク