PostgresqlDateSql::$replace

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php \Drupal\views\Plugin\views\query\PostgresqlDateSql::replace
  2. 8.9.x core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php \Drupal\views\Plugin\views\query\PostgresqlDateSql::replace
  3. 11.x core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php \Drupal\views\Plugin\views\query\PostgresqlDateSql::replace

An array of PHP-to-PostgreSQL replacement patterns.

Type: array

File

core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php, line 32

Class

PostgresqlDateSql
PostgreSQL-specific date handling.

Namespace

Drupal\views\Plugin\views\query

Code

protected static $replace = [
    'Y' => 'YYYY',
    'y' => 'YY',
    'M' => 'Mon',
    'm' => 'MM',
    // No format for Numeric representation of a month, without leading zeros.
'n' => 'MM',
    'F' => 'Month',
    'D' => 'Dy',
    'd' => 'DD',
    'l' => 'Day',
    // No format for Day of the month without leading zeros.
'j' => 'DD',
    'W' => 'IW',
    'H' => 'HH24',
    'h' => 'HH12',
    'i' => 'MI',
    's' => 'SS',
    'A' => 'AM',
];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.