Set the Shipment-Date

@param string|int|null $shipmentDate - Shipment-Date as String YYYY-MM-DD or the int value time() of the date | null for today (+1 Day on Sunday)
@param bool $useIntTime - Use the int Time Value instead of a String
422962
public function setShipmentDate($shipmentDate, $useIntTime = false) {
		if($useIntTime) {
			// Convert Time-Stamp to Date
			$shipmentDate = date('Y-m-d', $shipmentDate);

			if($shipmentDate === false)
				$shipmentDate = null;
		}

		$this->shipmentDate = $shipmentDate;
	}
1133052
@Override
	public void removeByLtS(Date sentDate) {
		for (CommerceNotificationQueueEntry commerceNotificationQueueEntry : findByLtS(
				sentDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceNotificationQueueEntry);
		}
	}
1273563
public void setDate(String itemName, Date date) {
        if (date == null) {
            setItem(itemName, null);
        } else {
            setItem(itemName, DateUtil.toHL7(date));
        }
    }
906118
public function calculateDays(string $deliveryDate, string $referenceDate): int
    {
        $timestampDeliveryDate = $this->DM->convertDateToTimestamp($deliveryDate);
        $timestampReferenceDate = $this->DM->convertDateToTimestamp($referenceDate);
        $timestampConceptionDate = $timestampDeliveryDate - $this->pregnancyDuration;
        return ceil(($timestampReferenceDate - $timestampConceptionDate) / $this->periodDay);
    }
109877
public void setEndDate(Date dateEnd)
    {
        try   {
            dateEnd = m_productItem.getEndDate(); // Date as it appears on the screen
            Date timeNew = m_productItem.setRemoteEndDate(dateEnd);
            if (!timeNew.equals(dateEnd))
            {
                Date dateStart = m_productItem.getStartDate();
                String[] rgstrMeals = m_productItem.getMealCache(dateStart, dateEnd);

                m_productItem.setCacheData(null, timeNew, null, rgstrMeals);
                // Usually, you would have to update the data, but removing the icon in the next step will do this.
            }
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
        try   {
            Thread.sleep(2000);     // Sleep for 2 seconds
        } catch (InterruptedException e)    {
        }
        m_productItem.setStatus(m_productItem.getStatus() & ~(1 << 1));
    }
255676
public void setCreatedDate(Date createdDate) {
        _createdDate = createdDate == null ? null : new Date(createdDate.getTime());
    }
863400
private function setShippingMethod($quote, $transaction)
    {
        if ($quote->isVirtual()) {
            return;
        }

        $shippingAddress = $quote->getShippingAddress();
        $shippingAddress->setCollectShippingRates(true);

        $shippingMethod = $transaction->order->cart->shipments[0]->reference;

        $shippingAddress->setShippingMethod($shippingMethod)->save();
    }
225171
public function setQueuedDate($ts)
    {
        if ($ts === null) {
            $this->queuedDate = null;
            return $this;
        }

        if (is_string($ts)) {
            try {
                $ts = new DateTime($ts);
            } catch (Exception $e) {
                throw new InvalidArgumentException(
                    sprintf('Can not set queued date: %s', $e->getMessage())
                );
            }
        }

        if (!($ts instanceof DateTimeInterface)) {
            throw new InvalidArgumentException(
                'Invalid "Queued Date" value. Must be a date/time string or a DateTime object.'
            );
        }

        $this->queuedDate = $ts;

        return $this;
    }
970841
function setEndDate($date)
    {
        /*
          To indicate that a certificate has no well-defined expiration date,
          the notAfter SHOULD be assigned the GeneralizedTime value of
          99991231235959Z.

          -- http://tools.ietf.org/html/rfc5280#section-4.1.2.5
        */
        if (strtolower($date) == 'lifetime') {
            $temp = '99991231235959Z';
            $asn1 = new ASN1();
            $temp = chr(ASN1::TYPE_GENERALIZED_TIME) . $asn1->_encodeLength(strlen($temp)) . $temp;
            $this->endDate = new Element($temp);
        } else {
            if (!is_object($date) || !is_a($date, 'DateTime')) {
                $date = new DateTime($date, new DateTimeZone(@date_default_timezone_get()));
            }

            $this->endDate = $date->format('D, d M Y H:i:s O');
        }
    }
85687
public void setEndDate(com.google.api.ads.admanager.axis.v201902.Date endDate) {
        this.endDate = endDate;
    }
315774
private static Date getSentDate(MimeMessage msg, Date defaultVal) {
        if (msg == null) {
            return defaultVal;
        }
        try {
            Date sentDate = msg.getSentDate();
            if (sentDate == null) {
                return defaultVal;
            } else {
                return sentDate;
            }
        } catch (MessagingException me) {
            return new Date();
        }
    }
1146944
public void setDate(Date date)
    {
        String dateString = "";
        if (date != null)
    		dateString = dateFormat.format(date);
        jTextField2.setText(dateString);
        jCalendarButton1.setTargetDate(date);
    }
864992
public void setDate(Date date) {
		dateEditor.setDate(date);
		if (getParent() != null) {
			getParent().invalidate();
		}
	}
319635
public final void setDateSeen(final Date pDateSeen) {
    if (pDateSeen == null) {
      this.dateSeen = null;
    } else {
      this.dateSeen = new Date(pDateSeen.getTime());
    }
  }
260384
public static void setTime(Datebox datebox, Timebox timebox, Date value) {
        value = value == null ? new Date() : value;
        datebox.setValue(DateUtil.stripTime(value));
        timebox.setValue(value);
    }
627896
function setExdate( $exdates, $params=FALSE ) {
    $exdate = array();
    $exdate['params'] = $this->_setParams( $params, array( 'VALUE' => 'DATE-TIME' ) );
    $parno  = ( isset( $exdate['params']['TZID'] )) ? 6 : null;
    $parno  = $this->_existRem( $exdate['params'], 'VALUE', 'DATE-TIME', 7, $parno );
    if( !isset( $parno )) $parno = $this->_existRem( $exdate['params'], 'VALUE', 'DATE', 3 );
    foreach( $exdates as $eix => $theExdate ) {
      if(  is_array( $theExdate ) &&
         ( in_array( count( $theExdate ), array( 3, 4, 6, 7 )))) {
        if( isset( $exdate['params']['TZID'] ))
          $theExdate['tz'] = $exdate['params']['TZID'];
        if( !isset( $parno )) {
          if( 4 < count( $theExdate ))
            $parno = 7;
          else
            $parno = 3;
        }
        $exdatea   = $this->_date_time_array( $theExdate, $parno );
      }
      elseif( is_array( $theExdate ) && isset( $theExdate['timestamp'] )) {
        if( isset( $exdate['params']['TZID'] ))
          $theExdate['tz'] = $exdate['params']['TZID'];
        $tz        = ( isset( $theExdate['tz'] )) ? ' '.$theExdate['tz'] : null;
        if( !isset( $parno ))
          $parno   = ( !empty( $tz )) ? 7 : 6;
        $exdatea   = $this->_date_time_string( date( 'Y-m-d H:i:s', $theExdate['timestamp'] ).$tz, $parno );
      }
      elseif( 8 <= strlen( trim( $theExdate ))) { // ex. 2006-08-03 10:12:18
        $exdatea   = $this->_date_time_string( $theExdate, $parno );
        if( isset( $exdate['params']['TZID'] ))
          $exdatea['tz'] = $exdate['params']['TZID'];
      }
      if( !isset( $parno )) {
        $parno     = count( $exdatea );
        if( 6 == $parno )
          $parno   = 7;
      }
      if( isset( $exdatea['tz'] ))
        $exdatea['tz'] = (string) $exdatea['tz'];
      $exdate['value'][] = $exdatea;
    }
    if( 0 < count( $exdate['value'] )) {
      if( 3 == $parno ) {
        $exdate['params']['VALUE'] = 'DATE';
        foreach( $exdate['value'] as $eix => $exdatea )
          unset( $exdate['value'][$eix]['tz'] );
        unset( $exdate['params']['TZID'] );
      }
      if( !empty( $exdate['value'][0]['tz'] )   &&
           ( $exdate['value'][0]['tz'] != 'Z' ) &&
        ( !( in_array($exdate['value'][0]['tz']{0}, array( '+', '-' )) &&
             ctype_digit( substr( $exdate['value'][0]['tz'], 1 ))) &&
          !ctype_digit( $exdate['value'][0]['tz'] ) ) ) {
        $exdate['params']['TZID'] = $exdate['value'][0]['tz'];
        foreach( $exdate['value'] as $exix => $exdatea ) {
          if( !empty( $exdate['value'][0]['tz'] )   &&
               ( $exdate['value'][0]['tz'] != 'Z' ) &&
            ( !( in_array($exdate['value'][0]['tz']{0}, array( '+', '-' )) &&
                 ctype_digit( substr( $exdate['value'][0]['tz'], 1 ))) &&
              !ctype_digit( $exdate['value'][0]['tz'] ) ) )
            unset( $exdate['value'][$exix]['tz'] );
        }
      }
      elseif( isset( $exdate['params']['TZID'] ))
        unset( $exdate['params']['TZID'] );
      $this->exdate[] = $exdate;
    }
  }
819299
public void setDate(com.google.api.ads.admanager.axis.v201805.Date date) {
        this.date = date;
    }