You are here

public function DateArgumentWrapper::getArgFormat in Calendar 8

Get the argument date format for the handler.

\Drupal\views\Plugin\views\argument\Date has no getter for protected argFormat member.

Return value

string

2 calls to DateArgumentWrapper::getArgFormat()
DateArgumentWrapper::createFromFormat in src/DateArgumentWrapper.php
DateArgumentWrapper::validateValue in src/DateArgumentWrapper.php
Check if a string value is valid for this format.

File

src/DateArgumentWrapper.php, line 85

Class

DateArgumentWrapper
The DateArgumentWrapper class.

Namespace

Drupal\calendar

Code

public function getArgFormat() {
  $class = get_class($this->dateArg);
  if (stripos($class, 'YearMonthDate') !== FALSE) {
    return 'Ym';
  }
  if (stripos($class, 'FullDate') !== FALSE) {
    return 'Ymd';
  }
  if (stripos($class, 'YearDate') !== FALSE) {
    return 'Y';
  }
  if (stripos($class, 'YearWeekDate') !== FALSE) {
    return 'oW';
  }
}