Ejemplo n.º 1
0
 /**
  * Returns a copy of this {@code OffsetDateTime} with the specified number of minutes added.
  * <p>
  * This instance is immutable and unaffected by this method call.
  *
  * @param int $minutes the minutes to add, may be negative
  * @return OffsetDateTime an {@code OffsetDateTime} based on this date-time with the minutes added, not null
  * @throws DateTimeException if the result exceeds the supported date range
  */
 public function plusMinutes($minutes)
 {
     return $this->_with($this->dateTime->plusMinutes($minutes), $this->offset);
 }
Ejemplo n.º 2
0
 /**
  * Returns a copy of this {@code ZonedDateTime} with the specified number of minutes added.
  * <p>
  * This operates on the instant time-line, such that adding one minute will
  * always be a duration of one minute later.
  * This may cause the local date-time to change by an amount other than one minute.
  * Note that this is a different approach to that used by days, months and years.
  * <p>
  * This instance is immutable and unaffected by this method call.
  *
  * @param int $minutes the minutes to add, may be negative
  * @return ZonedDateTime a {@code ZonedDateTime} based on this date-time with the minutes added, not null
  * @throws DateTimeException if the result exceeds the supported date range
  */
 public function plusMinutes($minutes)
 {
     return $this->resolveInstant($this->dateTime->plusMinutes($minutes));
 }