function date_iso8601

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

File

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/date_iso8601/7.x