Beispiel #1
0
 public OffsetDateTime PlusSeconds(long seconds) => this + Duration.FromSeconds(seconds);
Beispiel #2
0
 public ZonedDateTime PlusSeconds(long seconds) => this + Duration.FromSeconds(seconds);
Beispiel #3
0
 /// <summary>
 /// From seconds
 /// </summary>
 /// <param name="seconds"></param>
 /// <returns></returns>
 public static Duration AsDurationOfSeconds(this double seconds) => Duration.FromSeconds(seconds);
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Instant" /> struct based
 /// on a number of seconds since the Unix epoch of (ISO) January 1st 1970, midnight, UTC.
 /// </summary>
 /// <param name="seconds">Number of seconds since the Unix epoch. May be negative (for instants before the epoch).</param>
 /// <returns>An <see cref="Instant"/> at exactly the given number of seconds since the Unix epoch.</returns>
 /// <exception cref="ArgumentOutOfRangeException">The constructed instant would be out of the range representable in Noda Time.</exception>
 public static Instant FromUnixTimeSeconds(long seconds)
 {
     Preconditions.CheckArgumentRange(nameof(seconds), seconds, MinSeconds, MaxSeconds);
     return(Instant.FromTrustedDuration(Duration.FromSeconds(seconds)));
 }
Beispiel #5
0
 /// <summary>
 /// From seconds
 /// </summary>
 /// <param name="seconds"></param>
 /// <returns></returns>
 public static Duration AsDurationOfSeconds(this long seconds) => Duration.FromSeconds(seconds);