1 date.class.inc public BackdropDateTime::removeGranularity($g)

Removes a granularity entry from the array.

Parameters

string $g: A single date part.

File

core/includes/date.class.inc, line 276

Class

BackdropDateTime
Extends PHP DateTime class for use with Backdrop.

Code

public function removeGranularity($g) {
  if (($key = array_search($g, $this->granularity)) !== FALSE) {
    unset($this->granularity[$key]);
  }
}