function date_iso8601

Returns an ISO8601 formatted date based on the given date.

Callback for use within hook_rdf_mapping() implementations.

Parameters

$date: A UNIX timestamp.

Return value

string An ISO8601 formatted date.

Related topics

7 string references to 'date_iso8601'
comment_rdf_mapping in drupal/core/modules/comment/comment.module
Implements hook_rdf_mapping().
hook_rdf_mapping in drupal/core/modules/rdf/rdf.api.php
Allow modules to define RDF mappings for field bundles.
MappingDefinitionTest::testMappingDefinitionRandomContentType in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
Creates a random content type and node and ensures the default mapping for the node is being used.
MappingDefinitionTest::testMappingDefinitionTestBundleInstall in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
Creates a content type and a node of type test_bundle_hook_install and tests whether the RDF mapping defined in rdf_test.install is used.
MappingHookTest::testMapping in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/MappingHookTest.php
Tests that hook_rdf_mapping() correctly returns and processes mapping.

... See full list

File

drupal/core/includes/common.inc, line 1293
Common functions that many Drupal modules will need to reference.

Code

function date_iso8601($date) {

  // The DATE_ISO8601 constant cannot be used here because it does not match
  // date('c') and produces invalid RDF markup.
  return date('c', $date);
}