Example #1
0
        public static bool TryParse(string s, out DateTimeBase result)
        {
            DateTime resultAsDateTime;
            bool     returnValue = DateTime.TryParse(s, out resultAsDateTime);

            result = new DateTimeWrapper(resultAsDateTime);
            return(returnValue);
        }
Example #2
0
 public static bool Equals(DateTimeBase t1, DateTimeBase t2)
 {
     return(DateTime.Equals(t1.WrappedValue, t2.WrappedValue));
 }
Example #3
0
 public static int Compare(DateTimeBase t1, DateTimeBase t2)
 {
     return(DateTime.Compare(t1.WrappedValue, t2.WrappedValue));
 }
Example #4
0
        public static bool TryParseExact(string s, string format, IFormatProvider provider, DateTimeStyles style, out DateTimeBase result)
        {
            DateTime resultAsDateTime;
            bool     returnValue = DateTime.TryParseExact(s, format, provider, style, out resultAsDateTime);

            result = new DateTimeWrapper(resultAsDateTime);
            return(returnValue);
        }
Example #5
0
 public static DateTimeBase SpecifyKind(DateTimeBase value, DateTimeKind kind)
 {
     return(new DateTimeWrapper(DateTime.SpecifyKind(value.WrappedValue, kind)));
 }