コード例 #1
0
ファイル: Date.cs プロジェクト: LauraXiulan/Qowaiv
 /// <summary>Subtracts the specified duration from this instance.</summary>
 /// <param name="value">
 /// An instance of <see cref="DateSpan"/>.
 /// </param>
 /// <returns>
 /// A date equal to the date and time represented by this instance
 /// minus the time interval represented by value.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// The result is less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/>.
 /// </exception>
 public Date Subtract(DateSpan value) => Add(-value);
コード例 #2
0
 /// <summary>Returns a new local date time that adds the value of the specified <see cref="DateSpan"/>
 /// to the value of this instance.
 /// </summary>
 /// <param name="value">
 /// A <see cref="DateSpan"/> object that represents a positive or negative time interval.
 /// </param>
 /// <returns>
 /// A new date whose value is the sum of the date and time represented
 /// by this instance and the time interval represented by value.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// The resulting date is less than <see cref="MinValue"/> or greater
 /// than <see cref="MaxValue"/>.
 /// </exception>
 public LocalDateTime Add(DateSpan value) => Add(value, false);
コード例 #3
0
ファイル: Date.cs プロジェクト: LauraXiulan/Qowaiv
 /// <summary>Returns a new date that adds the value of the specified <see cref="DateSpan"/>
 /// to the value of this instance.
 /// </summary>
 /// <param name="value">
 /// A <see cref="DateSpan"/> object that represents a positive or negative time interval.
 /// </param>
 /// <returns>
 /// A new date whose value is the sum of the date and time represented
 /// by this instance and the time interval represented by value.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// The resulting date is less than <see cref="MinValue"/> or greater
 /// than <see cref="MaxValue"/>.
 /// </exception>
 public Date Add(DateSpan value) => Add(value, false);
コード例 #4
0
 /// <summary>Returns a new local date time that adds the value of the specified <see cref="DateSpan"/>
 /// to the value of this instance.
 /// </summary>
 /// <param name="d">
 /// The date time to add a <see cref="DateSpan"/> to.
 /// </param>
 /// <param name="value">
 /// A <see cref="DateSpan"/> object that represents a positive or negative time interval.
 /// </param>
 /// <returns>
 /// A new date whose value is the sum of the date and time represented
 /// by this instance and the time interval represented by value.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// The resulting date is less than <see cref="DateTime.MinValue"/> or greater
 /// than <see cref="DateTime.MaxValue"/>.
 /// </exception>
 public static DateTime Add(this DateTime d, DateSpan value) => d.Add(value, false);