return $data;
} /**
* @covers ::daysInMonth
*/
public function testDaysInMonth() { // @todo Consider deprecating passing NULL in
// https://www.drupal.org/project/drupal/issues/3299788
// Passing NULL, FALSE, or an empty string should default to now. Just
// check these are NOT null to avoid copying the implementation here.
$this->
assertNotNull(DateHelper::
daysInMonth());
$this->
assertNotNull(DateHelper::
daysInMonth(FALSE
));
$this->
assertNotNull(DateHelper::
daysInMonth(''
));
// Pass nothing and expect to get NULL.
$this->
assertNull(DateHelper::
daysInMonth(0
));
$this->
assertNull(DateHelper::
daysInMonth('0'
));
$value = '2022-12-31 00:00:00';
$dateString = DateHelper::
daysInMonth($value);
$this->
assertEquals('31',
$dateString);