Mega Code Archive

 
Categories / C# / Date Time
 

Gets the days in month

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cmoss.Util {     public class DateFunctions     {         /// <summary>         /// Gets the days in month.         /// </summary>         /// <param name="date">The date.</param>         /// <returns></returns>         public static int GetDaysInMonth(DateTime date)         {             return DateTime.DaysInMonth(date.Year, date.Month);         }     } }