You are here

function date_iso8601 in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/common.inc \date_iso8601()

Returns an ISO8601 formatted date based on the given date.

Parameters

$date: A UNIX timestamp.

Return value

string An ISO8601 formatted date.

Related topics

1 string reference to 'date_iso8601'
RdfaAttributesTest::testDatatypeCallback in core/modules/rdf/src/Tests/RdfaAttributesTest.php
Test attribute creation for mappings which override human-readable content.

File

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