Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Date.php

function Date::getDateField

Same name in this branch
  1. 11.1.x core/modules/datetime/src/Plugin/views/sort/Date.php \Drupal\datetime\Plugin\views\sort\Date::getDateField()

Overrides HandlerBase::getDateField

1 call to Date::getDateField()
Date::getDateFormat in core/modules/datetime/src/Plugin/views/argument/Date.php
Creates cross-database SQL date formatting.

File

core/modules/datetime/src/Plugin/views/argument/Date.php, line 65

Class

Date
Abstract argument handler for dates.

Namespace

Drupal\datetime\Plugin\views\argument

Code

public function getDateField() {
    // Use string date storage/formatting since datetime fields are stored as
    // strings rather than UNIX timestamps.
    return $this->query
        ->getDateField("{$this->tableAlias}.{$this->realField}", TRUE, $this->calculateOffset);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal