Beispiel #1
0
 public static string ToLongDateTimeString(DateTime dtm)
 {
     if (WfDateTime.IsUnAssigned(dtm))
     {
         return("UnAssigned");
     }
     return(dtm.ToLongDateString() + " " + dtm.ToLongTimeString());
 }
Beispiel #2
0
        public static bool TryParse(string s, out WfDateTime result)
        {
            DateTime dtm;
            bool     ret = DateTime.TryParse(s, out dtm);

            result = (WfDateTime)dtm;
            return(ret);
        }
Beispiel #3
0
 public WfDateTime(DateTime dateTime)
 {
     if (WfDateTime.IsUnAssigned(dateTime))
     {
         return;
     }
     this._dtm = dateTime;
 }
Beispiel #4
0
 public static bool IsUnAssigned(WfDateTime wfdtm)
 {
     if (wfdtm._dtm <= new DateTime(1900, 1, 1))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #5
0
 public string ToXmlString()
 {
     return(WfDateTime.ToXmlString(this));
 }
Beispiel #6
0
 public string ToLongFileSystemString()
 {
     return(WfDateTime.ToLongFileSystemString(this));
 }
Beispiel #7
0
 public string ToLongDateTimeString()
 {
     return(WfDateTime.ToLongDateTimeString(this));
 }
Beispiel #8
0
 public string ToShortDateTimeString()
 {
     return(WfDateTime.ToShortDateTimeString(this));
 }
Beispiel #9
0
 public static WfDateTime StartOfMonth(WfDateTime wfdtm)
 {
     return(new WfDateTime(new DateTime(wfdtm._dtm.Year, wfdtm._dtm.Month, 1, 0, 0, 0)));
 }
Beispiel #10
0
 public static bool Equals(WfDateTime wfdtm1, WfDateTime wfdtm2)
 {
     return(wfdtm1.Equals(wfdtm2));
 }
Beispiel #11
0
 public static int Compare(WfDateTime wfdtm1, WfDateTime wfdtm2)
 {
     return(wfdtm1.CompareTo(wfdtm2));
 }
Beispiel #12
0
 public static string ToXmlString(WfDateTime wfdtm)
 {
     return(WfDateTime.ToXmlString(wfdtm._dtm));
 }
Beispiel #13
0
 public static string ToLongFileSystemString(WfDateTime wfdtm)
 {
     return(WfDateTime.ToLongFileSystemString(wfdtm._dtm));
 }
Beispiel #14
0
 public int CompareTo(WfDateTime other)
 {
     return(this.CompareTo((object)other));
 }
Beispiel #15
0
        public static bool TryParse(string s, IFormatProvider provider, System.Globalization.DateTimeStyles style, out WfDateTime result)
        {
            DateTime dtm;
            bool     ret = DateTime.TryParse(s, provider, style, out dtm);

            result = (WfDateTime)dtm;
            return(ret);
        }
Beispiel #16
0
 public static WfDateTime EndOfDay(WfDateTime wfdtm)
 {
     return(wfdtm.StartOfDay().AddDays(1));
 }
Beispiel #17
0
 public bool Equals(WfDateTime other)
 {
     return(this.Equals((object)other));
 }
Beispiel #18
0
 public static WfDateTime EndOfMonth(WfDateTime wfdtm)
 {
     return(wfdtm.StartOfMonth().AddMonths(1));
 }
Beispiel #19
0
 public static string ToShortDateTimeString(WfDateTime wfdtm)
 {
     return(WfDateTime.ToShortDateTimeString(wfdtm._dtm));
 }