Formatting

  1. 7.x drupal/includes/common.inc format
  2. 5.x drupal/includes/common.inc format
  3. 6.x drupal/includes/common.inc format
  4. 8.x drupal/core/includes/common.inc format

Functions to format numbers, strings, dates, etc.

Functions

Namesort descending Location Description
date_iso8601 drupal/includes/common.inc Returns an ISO8601 formatted date based on the given date.
format_date drupal/includes/common.inc Formats a date, using a date type or a custom date format string.
format_interval drupal/includes/common.inc Formats a time interval with the requested granularity.
format_plural drupal/includes/common.inc Formats a string containing a count of items.
format_rss_channel drupal/includes/common.inc Formats an RSS channel.
format_rss_item drupal/includes/common.inc Formats a single RSS item.
format_size drupal/includes/common.inc Generates a string representation for the given byte count.
format_username drupal/includes/common.inc Format a username.
format_xml_elements drupal/includes/common.inc Formats XML elements.
parse_size drupal/includes/common.inc Parses a given byte count.
_format_date_callback drupal/includes/common.inc Translates a formatted date string.

File

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