Formatting in Drupal 7
Same name and namespace in other branches
- 8 core/includes/common.inc \format
- 4 includes/common.inc \format
- 5 includes/common.inc \format
- 6 includes/common.inc \format
- 9 core/includes/common.inc \format
Functions to format numbers, strings, dates, etc.
File
- includes/
common.inc, line 1743 - Common functions that many Drupal modules will need to reference.
Functions
|
Name |
Location | Description |
|---|---|---|
| date_iso8601 |
includes/ |
Returns an ISO8601 formatted date based on the given date. |
| format_date |
includes/ |
Formats a date, using a date type or a custom date format string. |
| format_interval |
includes/ |
Formats a time interval with the requested granularity. |
| format_plural |
includes/ |
Formats a string containing a count of items. |
| format_rss_channel |
includes/ |
Formats an RSS channel. |
| format_rss_item |
includes/ |
Formats a single RSS item. |
| format_size |
includes/ |
Generates a string representation for the given byte count. |
| format_username |
includes/ |
Format a username. |
| format_xml_elements |
includes/ |
Formats XML elements. |
| parse_size |
includes/ |
Parses a given byte count. |
| _format_date_callback |
includes/ |
Translates a formatted date string. |