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

Breadcrumb

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

function DateCaster::formatDateTime

2 calls to DateCaster::formatDateTime()
DateCaster::castDateTime in vendor/symfony/var-dumper/Caster/DateCaster.php
DateCaster::castPeriod in vendor/symfony/var-dumper/Caster/DateCaster.php

File

vendor/symfony/var-dumper/Caster/DateCaster.php, line 118

Class

DateCaster
Casts DateTimeInterface related classes to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

private static function formatDateTime(\DateTimeInterface $d, string $extra = '') : string {
    return $d->format('Y-m-d H:i:' . self::formatSeconds($d->format('s'), $d->format('u')) . $extra);
}

API Navigation

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