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

Breadcrumb

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

function DateTimeRangeTrait::endDateIsDisplayed

Gets whether the end date should be displayed.

Return value

bool True if the end date should be displayed. False otherwise.

2 calls to DateTimeRangeTrait::endDateIsDisplayed()
DateTimeRangeTrait::renderStartEnd in core/modules/datetime_range/src/DateTimeRangeTrait.php
Creates a render array given start/end dates.
DateTimeRangeTrait::renderStartEndWithIsoAttribute in core/modules/datetime_range/src/DateTimeRangeTrait.php
Creates a render array with ISO attributes given start/end dates.

File

core/modules/datetime_range/src/DateTimeRangeTrait.php, line 150

Class

DateTimeRangeTrait
Provides friendly methods for datetime range.

Namespace

Drupal\datetime_range

Code

protected function endDateIsDisplayed() : bool {
    switch ($this->getSetting('from_to')) {
        case DateTimeRangeConstantsInterface::BOTH:
        case DateTimeRangeConstantsInterface::END_DATE:
            return TRUE;
    }
    return FALSE;
}

API Navigation

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