System.DateTimeExtension.StartOfQuarter C# (CSharp) Method

StartOfQuarter() public static method

public static StartOfQuarter ( this date ) : System.DateTime
date this
return System.DateTime
        public static DateTime StartOfQuarter(this DateTime date)
        {
            return new DateTime(date.Year, ((date.Month - 1) / 3) * 3 + 1, 1);
        }