Example #1
0
        /// <summary>
        /// Dates the difference.
        /// </summary>
        /// <param name="otherDate">
        /// The other date.
        /// </param>
        /// <returns>
        /// </returns>
        public TimeSpan DateDifference(IDateObjectModel otherDate)
        {
            if (Valid)
            {
                return(SingleDate.Subtract(otherDate.SingleDate));
            }

            return(new TimeSpan());
        }
Example #2
0
        /// <summary>
        /// Dates the difference.
        /// </summary>
        /// <param name="otherDate">
        /// The other date.
        /// </param>
        /// <returns>
        /// </returns>
        public TimeSpan DateDifference(IDateObjectModel otherDate)
        {
            Contract.Requires(otherDate != null);

            if (Valid)
            {
                return(SingleDate.Subtract(otherDate.SingleDate).Duration());
            }

            return(new TimeSpan());
        }