You are here

public function ChecklistapiChecklist::getLastUpdatedDate in Checklist API 8

Gets the last updated date.

Return value

string The last updated date formatted with format_date(), or 'n/a' if there is no saved progress.

File

src/ChecklistapiChecklist.php, line 190

Class

ChecklistapiChecklist
Defines the checklist class.

Namespace

Drupal\checklistapi

Code

public function getLastUpdatedDate() {
  return !empty($this->savedProgress['#changed']) ? \Drupal::service('date.formatter')
    ->format($this->savedProgress['#changed']) : t('n/a');
}