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

Breadcrumb

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

function Fields::getTimestamp

Same name in this branch
  1. 11.1.x vendor/ramsey/uuid/src/Nonstandard/Fields.php \Ramsey\Uuid\Nonstandard\Fields::getTimestamp()
  2. 11.1.x vendor/ramsey/uuid/src/Rfc4122/Fields.php \Ramsey\Uuid\Rfc4122\Fields::getTimestamp()

Overrides FieldsInterface::getTimestamp

File

vendor/ramsey/uuid/src/Guid/Fields.php, line 135

Class

Fields
GUIDs are comprised of a set of named fields, according to RFC 4122

Namespace

Ramsey\Uuid\Guid

Code

public function getTimestamp() : Hexadecimal {
    return new Hexadecimal(sprintf('%03x%04s%08s', hexdec($this->getTimeHiAndVersion()
        ->toString()) & 0xfff, $this->getTimeMid()
        ->toString(), $this->getTimeLow()
        ->toString()));
}

API Navigation

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