Lucene.Net.QueryParsers.TestQueryParser.GetLocalizedDate C# (CSharp) Method

GetLocalizedDate() private method

private GetLocalizedDate ( int year, int month, int day, bool extendLastDate ) : System.String
year int
month int
day int
extendLastDate bool
return System.String
		private System.String GetLocalizedDate(int year, int month, int day, bool extendLastDate)
		{
			System.Globalization.Calendar calendar = new System.Globalization.GregorianCalendar();
            System.DateTime temp = new System.DateTime(year, month, day, calendar);
			if (extendLastDate)
			{
                temp = temp.AddHours(23);
                temp = temp.AddMinutes(59);
                temp = temp.AddSeconds(59);
                temp = temp.AddMilliseconds(999);
            }
            return temp.ToShortDateString();
        }