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