summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2011-01-03 06:51:00 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2011-01-03 06:51:00 +0000
commit913adae6ad0e01b51010044ecb1520f0ae18b746 (patch)
tree823f166b58a0b039d1295adcf48d7a63e2837c2a /modules
parent0ba31d935055d5c12b5afaf256e5c319366296ef (diff)
downloadbrdo-913adae6ad0e01b51010044ecb1520f0ae18b746.tar.gz
brdo-913adae6ad0e01b51010044ecb1520f0ae18b746.tar.bz2
#989366 by jhodgdon: Improved documentation of hook_date_formats()
Diffstat (limited to 'modules')
-rw-r--r--modules/system/system.api.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 7917150c8..bb13e095b 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -3718,8 +3718,14 @@ function hook_archiver_info_alter(&$info) {
*
* Next to the 'long', 'medium' and 'short' date types defined in core, any
* module can define additional types that can be used when displaying dates. A
- * date type is a key which can be passed to format_date() to return a date in
- * the configured display format.
+ * date type is a key that can be passed to format_date() to return a date in
+ * the configured display format, once a format has been assigned to it. To
+ * assign a format to a date type, use
+ * @code variable_set('date_format_' . $type, $format); @endcode
+ * where $type is the machine-readable name defined here, and $format is a PHP
+ * date format string. This can also be done in the administrative interface,
+ * which allows date types defined here to be associated with date format
+ * strings defined in hook_date_formats().
*
* To avoid namespace collisions with date types defined by other modules, it is
* recommended that each date type starts with the module name. A date type