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

Breadcrumb

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

function DateCaster::formatSeconds

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

File

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

Class

DateCaster
Casts DateTimeInterface related classes to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

private static function formatSeconds(string $s, string $us) : string {
    return \sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us));
}

API Navigation

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