You are here

public function PriceList::getStartDate in Commerce Pricelist 8

Same name and namespace in other branches
  1. 8.2 src/Entity/PriceList.php \Drupal\commerce_pricelist\Entity\PriceList::getStartDate()

Gets the price list start date.

Return value

\Drupal\Core\Datetime\DrupalDateTime The price list start date.

Overrides PriceListInterface::getStartDate

File

src/Entity/PriceList.php, line 149

Class

PriceList
Defines the Price list entity.

Namespace

Drupal\commerce_pricelist\Entity

Code

public function getStartDate() {

  // Can't use the ->date property because it resets the timezone to UTC.
  return new DrupalDateTime($this
    ->get('start_date')->value);
}