The calculation will subtract a duration equivalent to the number of seconds expressed in milliseconds.
The following three lines are identical in effect:
DateTime subtracted = dt.minusSeconds(6); DateTime subtracted = dt.minus(Period.seconds(6)); DateTime subtracted = dt.withFieldAdded(DurationFieldType.seconds(), -6);
This datetime instance is immutable and unaffected by this method call. @param seconds the amount of seconds to subtract, may be negative @return the new datetime minus the increased seconds @since 1.1
This instance is immutable and unaffected by this method call. @param secondsToSubtract the seconds to subtract, positive or negative @return an {@code Instant} based on this instant with the specified seconds subtracted, not null @throws DateTimeException if the result exceeds the maximum or minimum instant @throws ArithmeticException if numeric overflow occurs
This instance is immutable and unaffected by this method call. @param seconds the seconds to subtract, may be negative @return an {@code OffsetDateTime} based on this date-time with the seconds subtracted, not null @throws DateTimeException if the result exceeds the supported date range
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|