diff --git a/date_api/date_api.module b/date_api/date_api.module index 160bc9f..b506faa 100644 --- a/date_api/date_api.module +++ b/date_api/date_api.module @@ -1706,9 +1706,14 @@ function date_timezone_abbr($refresh = FALSE) { * post-2038 dates and accept a date object instead of a timestamp as input. * Translates formatted date results, unlike PHP function date_format(). * Should only be used for display, not input, because it can't be parsed. - * - * @param object $date - * A date object. + * post-2038 dates, and accept a \DateObject (from date_api.module) instead of + * a timestamp as input. Translates formatted date results, unlike PHP function + * date_format(). Should only be used for display, not input, because it can't + * be parsed. + * + * @param \DateObject $date + * The date object to format. Note this cannot be an instance of the PHP + * \DateTime class: you must use date_api's wrapper class, \DateObject. * @param string $type * (optional) The date format to use. Can be 'small', 'medium' or 'large' for * the preconfigured date formats. If 'custom' is specified, then $format is @@ -1725,7 +1730,7 @@ function date_timezone_abbr($refresh = FALSE) { * * @see format_date() */ -function date_format_date($date, $type = 'medium', $format = '', $langcode = NULL) { +function date_format_date(DateObject $date, $type = 'medium', $format = '', $langcode = NULL) { if (empty($date)) { return ''; }