function TimestampAgoFormatter::defaultSettings
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\TimestampAgoFormatter::defaultSettings()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\TimestampAgoFormatter::defaultSettings()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\TimestampAgoFormatter::defaultSettings()
Overrides PluginSettingsBase::defaultSettings
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ TimestampAgoFormatter.php, line 95
Class
- TimestampAgoFormatter
- Plugin implementation of the 'timestamp' formatter as time ago.
Namespace
Drupal\Core\Field\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
return [
'future_format' => '@interval hence',
'past_format' => '@interval ago',
'granularity' => 2,
] + parent::defaultSettings();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.