2 // System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay
5 // Martin Willemoes Hansen (mwh@sysrq.dk)
6 // Lluis Sanchez Gual (lluis@ximian.com)
8 // (C) 2003 Martin Willemoes Hansen
12 using System.Globalization;
14 namespace System.Runtime.Remoting.Metadata.W3cXsd2001
17 public sealed class SoapDay : ISoapXsd
19 static string[] _datetimeFormats = new string[]
31 public SoapDay (DateTime value)
36 public DateTime Value {
37 get { return _value; }
38 set { _value = value; }
41 public static string XsdType {
42 get { return "gDay"; }
45 public string GetXsdType()
50 public static SoapDay Parse (string value)
52 DateTime d = DateTime.ParseExact (value, _datetimeFormats, null, DateTimeStyles.None);
53 return new SoapDay (d);
56 public override string ToString()
58 return _value.ToString("---dd", CultureInfo.InvariantCulture);