8.5.x common.inc date_iso8601($date)
8.0.x common.inc date_iso8601($date)
8.1.x common.inc date_iso8601($date)
8.2.x common.inc date_iso8601($date)
8.3.x common.inc date_iso8601($date)
8.4.x common.inc date_iso8601($date)
8.6.x common.inc date_iso8601($date)
7.x common.inc date_iso8601($date)

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

5 string references to 'date_iso8601'
comment_rdf_mapping in modules/comment/comment.module
Implements hook_rdf_mapping().
hook_rdf_mapping in modules/rdf/rdf.api.php
Allow modules to define RDF mappings for field bundles.
node_rdf_mapping in modules/node/node.module
Implements hook_rdf_mapping().
RdfMappingHookTestCase::testMapping in modules/rdf/rdf.test
Test that hook_rdf_mapping() correctly returns and processes mapping.
rdf_test_rdf_mapping in modules/rdf/tests/rdf_test.module
Implements hook_rdf_mapping().

File

includes/common.inc, line 2098
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);
}