예제 #1
0
 /// <summary>
 /// Subtracts the given time zone offset from this local instant, to give an <see cref="Instant" />.
 /// </summary>
 /// <remarks>
 /// This would normally be implemented as an operator, but as the corresponding "plus" operation
 /// on Instant cannot be written (as Instant is a public type and LocalInstant is an internal type)
 /// it makes sense to keep them both as methods for consistency.
 /// </remarks>
 /// <param name="offset">The offset between UTC and a time zone for this local instant</param>
 /// <returns>A new <see cref="Instant"/> representing the difference of the given values.</returns>
 public Instant Minus(Offset offset) => Instant.FromUntrustedDuration(duration.MinusSmallNanoseconds(offset.Nanoseconds));
예제 #2
0
 /// <summary>
 /// Subtracts the given time zone offset from this local instant, to give an <see cref="Instant" />.
 /// </summary>
 /// <remarks>
 /// This would normally be implemented as an operator, but as the corresponding "plus" operation
 /// on Instant cannot be written (as Instant is a public type and LocalInstant is an internal type)
 /// it makes sense to keep them both as methods for consistency.
 /// </remarks>
 /// <param name="offset">The offset between UTC and a time zone for this local instant</param>
 /// <returns>A new <see cref="Instant"/> representing the difference of the given values.</returns>
 public Instant Minus(Offset offset) => new Instant(duration.MinusSmallNanoseconds(offset.Nanoseconds));