public static function CommonDataConverter::dateIso8601Value in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rdf/src/CommonDataConverter.php \Drupal\rdf\CommonDataConverter::dateIso8601Value()
Converts a date entity field array into an ISO 8601 timestamp string.
Parameters
array $data: The array containing the 'value' element.
Return value
string Returns the ISO 8601 timestamp.
8 string references to 'CommonDataConverter::dateIso8601Value'
- d7_rdf_mapping.yml in core/
modules/ rdf/ migrations/ d7_rdf_mapping.yml - core/modules/rdf/migrations/d7_rdf_mapping.yml
- rdf.mapping.comment.comment.yml in core/
profiles/ standard/ config/ install/ rdf.mapping.comment.comment.yml - core/profiles/standard/config/install/rdf.mapping.comment.comment.yml
- rdf.mapping.node.article.yml in core/
profiles/ standard/ config/ install/ rdf.mapping.node.article.yml - core/profiles/standard/config/install/rdf.mapping.node.article.yml
- rdf.mapping.node.article.yml in core/
profiles/ demo_umami/ config/ install/ rdf.mapping.node.article.yml - core/profiles/demo_umami/config/install/rdf.mapping.node.article.yml
- rdf.mapping.node.forum.yml in core/
modules/ forum/ config/ optional/ rdf.mapping.node.forum.yml - core/modules/forum/config/optional/rdf.mapping.node.forum.yml
File
- core/
modules/ rdf/ src/ CommonDataConverter.php, line 32
Class
- CommonDataConverter
- Contains methods for common data conversions.
Namespace
Drupal\rdfCode
public static function dateIso8601Value($data) {
return \Drupal::service('date.formatter')
->format($data['value'], 'custom', 'c', 'UTC');
}