? profiles/testing
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.946
diff -u -p -r1.946 system.module
--- modules/system/system.module	7 Jul 2010 17:56:42 -0000	1.946
+++ modules/system/system.module	15 Jul 2010 14:28:19 -0000
@@ -3275,13 +3275,13 @@ function system_run_automated_cron() {
 }
 
 /**
- * Get the list of available date types and attributes.
+ * Gets the list of available date types and attributes.
  *
  * @param $type
- *   The date type, e.g. 'short', 'medium', 'long', 'custom'. If empty, then
- *   all attributes for that type will be returned.
+ *   A string containing the date type name.
+ *
  * @return
- *   Array of date types.
+ *   An array of date types.
  */
 function system_get_date_types($type = NULL) {
   $date_format_types = &drupal_static(__FUNCTION__);
@@ -3308,10 +3308,12 @@ function system_date_format_types() {
  * Implements hook_date_formats().
  *
  * @return
- *   An array of date formats with attributes 'type' (short, medium or long),
- *   'format' (the format string) and 'locales'. The 'locales' attribute is an
- *   array of locales, which can include both 2 character language codes like
- *   'en', 'fr', but also 5 character language codes like 'en-gb' and 'en-us'.
+ *   An array of date formats with the following attributes:
+ *   - type: A string containing the date type name.
+ *   - format: A date format string.
+ *   - locales: An array of locales, which can include both 2 character language
+ *     codes like 'en', 'fr', but also 5 character language codes like 'en-gb'
+ *     and 'en-us'.
  */
 function system_date_formats() {
   include_once DRUPAL_ROOT . '/includes/date.inc';
@@ -3319,13 +3321,13 @@ function system_date_formats() {
 }
 
 /**
- * Get the list of date formats for a particular format length.
+ * Gets the list of date formats for a particular format length.
  *
  * @param $type
- *   The date type: 'short', 'medium', 'long', 'custom'. If empty, then all
- *   available types will be returned.
+ *   A string containing the date type name.
+ *
  * @return
- *   Array of date formats.
+ *   An array of date formats.
  */
 function system_get_date_formats($type = NULL) {
   $date_formats = &drupal_static(__FUNCTION__);
@@ -3338,12 +3340,13 @@ function system_get_date_formats($type =
 }
 
 /**
- * Get the format details for a particular id.
+ * Gets the format details for a particular id.
  *
  * @param $dfid
  *   Identifier of a date format string.
+ *
  * @return
- *   Array of date format details.
+ *   An array of date format details.
  */
 function system_get_date_format($dfid) {
   return db_query('SELECT df.dfid, df.format, df.type, df.locked FROM {date_formats} df WHERE df.dfid = :dfid', array(':dfid' => $dfid))->fetch();
@@ -3370,13 +3373,14 @@ function system_date_formats_rebuild() {
 }
 
 /**
- * Get the appropriate date format for a type and locale.
+ * Gets the appropriate date format for a type and locale.
  *
  * @param $langcode
  *   Language code for the current locale. This can be a 2 character language
  *   code like 'en', 'fr', or a longer 5 character code like 'en-gb'.
  * @param $type
- *   Date type: short, medium, long, custom.
+ *   A string containing the date type name.
+ *
  * @return
  *   The format string, or NULL if no matching format found.
  */
@@ -3527,10 +3531,16 @@ function _system_date_formats_build() {
 }
 
 /**
- * Save a date type to the database.
+ * Saves a date type to the database.
  *
  * @param $date_format_type
- *   An array of attributes for a date type.
+ *   A date type array containing the following keys:
+ *   - type: A string containing the machine-readable name of the date type.
+ *   - title: A string containing the user interface name of the date type.
+ *   - locked: A boolean indicating whether or not this date type should be
+ *     configurable from the user interface.
+ *   - is_new: A boolean indicating whether or not this date type does not exist
+ *     in the database yet.
  */
 function system_date_format_type_save($date_format_type) {
   $type = array();
@@ -3548,10 +3558,10 @@ function system_date_format_type_save($d
 }
 
 /**
- * Delete a date type from the database.
+ * Deletes a date type from the database.
  *
  * @param $date_format_type
- *   The date type name.
+ *   A string containing the date type name.
  */
 function system_date_format_type_delete($date_format_type) {
   db_delete('date_formats')
@@ -3566,13 +3576,20 @@ function system_date_format_type_delete(
 }
 
 /**
- * Save a date format to the database.
+ * Saves a date format to the database.
  *
  * @param $date_format
- *   An array of attributes for a date format.
+ *   A date format array containing the following keys:
+ *   - type: A string containing the date type this format is associated with.
+ *   - format: A date format string.
+ *   - locked: A boolean indicating whether or not this format should be
+ *     configurable from the user interface.
  * @param $dfid
  *   If set, replace an existing date format with a new string using this
  *   identifier.
+ *
+ * @see system_get_date_types()
+ * @see http://php.net/date
  */
 function system_date_format_save($date_format, $dfid = 0) {
   $format = array();
@@ -3613,7 +3630,7 @@ function system_date_format_save($date_f
 }
 
 /**
- * Delete a date format from the database.
+ * Deletes a date format from the database.
  *
  * @param $date_format_id
  *   The date format string identifier.
