[Quantproject-developers] QuantProject/b1_ADT ExtendedDateTime.cs, 1.3, 1.4
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-01-19 18:54:45
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13267/b1_ADT Modified Files: ExtendedDateTime.cs Log Message: The method public static DateTime Min( DateTime dateTime1 , DateTime dateTime2 ) has been added Index: ExtendedDateTime.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/ExtendedDateTime.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExtendedDateTime.cs 22 Jul 2006 20:57:38 -0000 1.3 --- ExtendedDateTime.cs 19 Jan 2008 18:54:42 -0000 1.4 *************** *** 103,106 **** --- 103,119 ---- return this.DateTime.ToString() + " - " + this.BarComponent.ToString(); } + /// <summary> + /// Returns the earliest date + /// </summary> + /// <param name="dateTime1"></param> + /// <param name="dateTime2"></param> + /// <returns></returns> + public static DateTime Min( DateTime dateTime1 , DateTime dateTime2 ) + { + DateTime returnValue = dateTime1; + if ( dateTime2 < dateTime1 ) + returnValue = dateTime2; + return returnValue; + } // public static SortedList GetArray( SortedList sortedDateTimes ) // { |