You are here

public function EntityLegalDocumentVersion::getFormattedDate in Entity Legal 7

Same name and namespace in other branches
  1. 7.2 entity_legal.entity.inc \EntityLegalDocumentVersion::getFormattedDate()

Get the date for a given entity property.

Parameters

string $type: The type of date to retrieve, updated or created.

Return value

string The formatted date.

File

./entity_legal.entity.inc, line 376
Entity API main classes used by entity_legal module.

Class

EntityLegalDocumentVersion
Legal Document entity version class.

Code

public function getFormattedDate($type = 'updated') {
  switch ($type) {
    case 'updated':
      return format_date($this->updated);
    case 'created':
      return format_date($this->created);
  }
}