[Mono-devel-list] DateTime.cs patch
Philip Van Hoof
spamfrommailing at freax.org
Tue May 20 16:02:52 EDT 2003
On Tue, 2003-05-20 at 16:08, Philip Van Hoof wrote:
> Hi there Marcel and Martin
>
> ps. Maybe I will also implement the ToOADate()-method later this day
>
> I used "cvs diff -u DateTime.cs" to create the diff-file that has been
> attached.
As promised does this patch also implement the
DateTime.ToOADate()-method.
Again I attached a simple test-case for the implemented methods called
DateTimeTest.cs
--
Philip Van Hoof a.k.a. freax
me at freax dot org
http://www.freax.be -- http://www.freax.eu.org -- http://www.freax.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DateTime.cs.2.diff
Type: text/x-patch
Size: 3224 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030520/ebc499d5/attachment.bin
-------------- next part --------------
using System;
public class DateTimeTest {
public static int Main (string[] args)
{
int number=5000;
DateTime d = DateTime.FromOADate(number);
if (d.ToOADate() == number)
{
Console.WriteLine("DateTime.ToOADate() is correct");
}
//DateTime d = DateTime.Parse("1990-01-01");
Console.WriteLine(d.ToString());
foreach (string i in d.GetDateTimeFormats('m'))
{
Console.WriteLine(i);
}
foreach (string i in d.GetDateTimeFormats())
{
Console.WriteLine(i);
}
return 1;
}
}
More information about the Mono-devel-list
mailing list