Formatting

Functions to format numbers, strings, dates, etc.

Functions

NameLocationDescription
date_iso8601includes/common.incReturns an ISO8601 formatted date based on the given date.
format_dateincludes/common.incFormat a date with the given configured format or a custom format string.
format_intervalincludes/common.incFormat a time interval with the requested granularity.
format_pluralincludes/common.incFormat a string containing a count of items.
format_rss_channelincludes/common.incFormats an RSS channel.
format_rss_itemincludes/common.incFormat a single RSS item.
format_sizeincludes/common.incGenerate a string representation for the given byte count.
format_usernameincludes/common.incFormat a username.
format_xml_elementsincludes/common.incFormat XML elements.
parse_sizeincludes/common.incParse a given byte count.
_format_date_callbackincludes/common.incCallback function for preg_replace_callback().
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.