예제 #1
0
파일: CuiDate.cs 프로젝트: odnodn/mscui
        /// <summary>
        /// Constructs a CuiDate object, uses CuiDate.ParseExact to create a new temporary CuiDate object for the given string
        /// and copies the property values from the temporary CuiDate object to the new CuiDate object.
        /// </summary>
        /// <param name="date">The date value.</param>
        public CuiDate(string date)
        {
            CuiDate nd = CuiDate.ParseExact(date, CultureInfo.InvariantCulture);

            this.DateValue = nd.DateValue;
            this.DateType  = nd.DateType;
            this.Month     = nd.Month;
            this.Year      = nd.Year;
            this.NullIndex = nd.NullIndex;
        }
예제 #2
0
파일: CuiDate.cs 프로젝트: odnodn/mscui
 /// <summary>
 /// Parses a string that represents a date and returns a corresponding CuiDate object.
 /// </summary>
 /// <param name="date">The date to be parsed. </param>
 /// <returns>A new CuiDate object. </returns>
 /// <exception cref="System.ArgumentNullException">Date is null. </exception>
 /// <exception cref="System.FormatException">Date is not in a recognised format. </exception>
 public static CuiDate ParseExact(string date)
 {
     return(CuiDate.ParseExact(date, CultureInfo.CurrentCulture));
 }