date_iso8601

date_iso8601($date)

Returns an ISO8601 formatted date based on the given date.

Parameters

$date: A UNIX timestamp.

Return value

string An ISO8601 formatted date.

Related topics

Formatting
Functions to format numbers, strings, dates, etc.

File

core/includes/common.inc, line 335
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);
}
doc_Drupal
2016-10-29 09:01:05
Comments
Leave a Comment

Please login to continue.