[Quantproject-developers] QuantProject/b1_ADT ExtendedDateTime.cs, 1.4, 1.5
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-01-27 02:29:41
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20895/b1_ADT Modified Files: ExtendedDateTime.cs Log Message: The method public static string GetShortDescriptionForFileName( DateTime dateTime ) has been added. It returns a DateTime short description suitable for file names (no slashes) Index: ExtendedDateTime.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/ExtendedDateTime.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ExtendedDateTime.cs 19 Jan 2008 18:54:42 -0000 1.4 --- ExtendedDateTime.cs 27 Jan 2008 02:29:36 -0000 1.5 *************** *** 104,107 **** --- 104,120 ---- } /// <summary> + /// Returns a DateTime short description suitable for file names (no slashes) + /// </summary> + /// <returns></returns> + public static string GetShortDescriptionForFileName( + DateTime dateTime ) + { + string stringForFileName = + dateTime.Year.ToString() + "_" + + dateTime.Month.ToString().PadLeft( 2 , '0' ) + "_" + + dateTime.Day.ToString().PadLeft( 2 , '0' ); + return stringForFileName; + } + /// <summary> /// Returns the earliest date /// </summary> |