\Drupal\strata\Plugin\views\field Microtime

Renders unix microseconds as a date, keeping the part below the second.

Strata stores times in microseconds because a site can write the same subject twice in one second and the order matters. Rendering that through the ordinary date field would divide it by a million and lose the part that made it unambiguous, so a timeline of a busy second would show the same instant repeated.

The fractional part is shown by default for exactly that reason, and can be switched off for a report where the second is enough.

Summary

Methods
Properties
Constants
create
buildOptionsForm
render
No public properties found
No public constants found
defineOptions
dateFormatter
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$dateFormatter

$dateFormatter : ?\Drupal\Core\Datetime\DateFormatterInterface

The date formatter.

Type

DateFormatterInterface|null

Methods

create()

create(\Symfony\Component\DependencyInjection\ContainerInterface  $container, array  $configuration, string  $plugin_id, mixed  $plugin_definition) : static

{@inheritdoc}

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container

The container.

array $configuration

Plugin configuration.

string $plugin_id

Plugin id.

mixed $plugin_definition

Plugin definition.

Returns

static —

The handler.

buildOptionsForm()

buildOptionsForm(array  $form, \Drupal\Core\Form\FormStateInterface  $form_state) : void

{@inheritdoc}

Parameters

array $form

The form.

\Drupal\Core\Form\FormStateInterface $form_state

The form state.

Returns

void —

render()

render(\Drupal\views\ResultRow  $values) : string

{@inheritdoc}

Parameters

\Drupal\views\ResultRow $values

The row.

Returns

string —

The rendered value.

defineOptions()

defineOptions() : array<string,mixed>

{@inheritdoc}

Returns

array

The option definitions.