YearMonthDate.php in Drupal 10
File
core/modules/views/src/Plugin/views/argument/YearMonthDate.php
View source
<?php
namespace Drupal\views\Plugin\views\argument;
class YearMonthDate extends Date {
protected $format = 'F Y';
protected $argFormat = 'Ym';
public function summaryName($data) {
$created = $data->{$this->name_alias};
return $this->dateFormatter
->format(strtotime($created . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
public function title() {
return $this->dateFormatter
->format(strtotime($this->argument . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
}