Last Date Of Year - CSharp System

CSharp examples for System:DateTime Year

Description

Last Date Of Year

Demo Code


using System.Globalization;
using System;//from  w  w w  . ja v  a2 s.co  m

public class Main{
        public static DateTime LastDateOfYear(this DateTime date)
        {
            return new DateTime(date.Year, 12, 31);
        }
}

Related Tutorials