'#description' =>
$this->
t("How many time units will be used in formatting the time difference. For example, if '1' is selected then the displayed time difference will only contain a single time unit such as '2 years' or '5 minutes' never '2 years 3 months' or '5 minutes 8 seconds'."
),
'#default_value' =>
$time_diff['granularity'
],
'#options' =>
array_combine(range(1, 7
),
range(1, 7
)),
'#states' =>
$states,
];
$form['time_diff'
]['refresh'
] =
[ '#type' => 'select',
'#title' =>
$this->
t('Refresh interval'
),
'#description' =>
$this->
t('How often to refresh the displayed time difference. The time difference is refreshed on client-side, by JavaScript, without reloading the page.'
),
'#default_value' =>
$time_diff['refresh'
],
'#options' =>
$this->
getRefreshIntervals(),
'#states' =>
$states,
];
$form['time_diff'
]['description'
] =
[ '#type' => 'item',
'#title' =>
$this->
t('Fallback configuration'
),
'#description' =>
$this->
t('The configuration below is used as a fallback when JavaScript is not available on the page.'
),
'#states' =>
$states,
];
$form['date_format'
] =
[