Same name and namespace in other branches
  1. 10 core/includes/common.inc \format
  2. 4.7.x includes/common.inc \format
  3. 5.x includes/common.inc \format
  4. 6.x includes/common.inc \format
  5. 7.x includes/common.inc \format
  6. 8.9.x core/includes/common.inc \format
  7. 9 core/includes/common.inc \format

Functions to format numbers, strings, dates, etc.

Parent topics

File

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

Functions

Namesort descending Location Description
format_date includes/common.inc Format a date with the given configured format or a custom format string.
format_interval includes/common.inc Format a time interval with the requested granularity.
format_name includes/common.inc Format a username.
format_plural includes/common.inc Format a string containing a count of items.
format_rss_channel includes/common.inc Formats an RSS channel.
format_rss_item includes/common.inc Format a single RSS item.
format_size includes/common.inc Generate a string representation for the given byte count.