Comment block fixes
[civicrm-core.git] / CRM / Utils / Date.php
index 8c8a966b5291c38bc97694d299242b40da8db445..3c377a6cfc05e1ea11bfa3633cb47fa460d30f10 100644 (file)
@@ -41,9 +41,9 @@ class CRM_Utils_Date {
   /**
    * format a date by padding it with leading '0'.
    *
-   * @param array  $date ('Y', 'M', 'd')
-   * @param string $separator   the seperator to use when formatting the date
-   * @param string $invalidDate what to return if the date is invalid
+   * @param array $date ('Y', 'M', 'd')
+   * @param string $separator the seperator to use when formatting the date
+   * @param int|string $invalidDate what to return if the date is invalid
    *
    * @return string - formatted string for date
    *
@@ -208,6 +208,8 @@ class CRM_Utils_Date {
   /**
    * return abbreviated month names according to the locale
    *
+   * @param bool $month
+   *
    * @return array  1-based array with abbreviated month names
    *
    * @static
@@ -281,10 +283,11 @@ class CRM_Utils_Date {
    * %P - uppercase ante/post meridiem ('AM', 'PM')
    * %Y - year as a decimal number including the century ('2005')
    *
-   * @param string $date    date and time in 'YYYY-MM-DD hh:mm:ss' format
-   * @param string $format  the output format
-   * @param array  $dateParts  an array with the desired date parts
+   * @param $dateString
+   * @param string $format the output format
+   * @param array $dateParts an array with the desired date parts
    *
+   * @internal param string $date date and time in 'YYYY-MM-DD hh:mm:ss' format
    * @return string  the $format-formatted $date
    *
    * @static
@@ -469,9 +472,11 @@ class CRM_Utils_Date {
   /**
    * converts the any given date to default date format.
    *
-   * @param array  $params     has given date-format
-   * @param int    $dateType   type of date
-   * @param string $dateParam  index of params
+   * @param array $params has given date-format
+   * @param int $dateType type of date
+   * @param string $dateParam index of params
+   *
+   * @return bool
    * @static
    */
   static function convertToDefaultDate(&$params, $dateType, $dateParam) {
@@ -739,7 +744,10 @@ class CRM_Utils_Date {
    * Function to get start date and end from
    * the given relative term and unit
    *
-   * @param  date  $relative  eg: term.unit
+   * @param  date $relative eg: term.unit
+   *
+   * @param $from
+   * @param $to
    *
    * @return array start date, end date
    * @static
@@ -818,11 +826,13 @@ class CRM_Utils_Date {
   /**
    * Function to calculate next payment date according to provided  unit & interval
    *
-   * @param string $unit     frequency unit like year,month, week etc..
+   * @param string $unit frequency unit like year,month, week etc..
    *
-   * @param int    $interval frequency interval.
+   * @param int $interval frequency interval.
    *
-   * @param array  $date     start date of pledge.
+   * @param array $date start date of pledge.
+   *
+   * @param bool $dontCareTime
    *
    * @return array $result contains new date with added interval
    * @access public
@@ -883,6 +893,8 @@ class CRM_Utils_Date {
    *
    * @param $format given format ( eg 'M Y', 'Y M' )
    * return array of qfMapping and date parts for date format.
+   *
+   * @return array|null|string
    */
   static function &checkBirthDateFormat($format = NULL) {
     $birthDateFormat = NULL;
@@ -1434,13 +1446,13 @@ class CRM_Utils_Date {
   /**
    *  Function to process date, convert to mysql format
    *
-   *  @param string $date date string
-   *  @param string $time time string
-   *  @param string $returnNullString  'null' needs to be returned
+   * @param string $date date string
+   * @param string $time time string
+   * @param bool|string $returnNullString 'null' needs to be returned
    *                so that db oject will set null in db
-   *  @param string $format expected return date format.( default is  mysql )
+   * @param string $format expected return date format.( default is  mysql )
    *
-   *  @return string $mysqlDate date format that is excepted by mysql
+   * @return string $mysqlDate date format that is excepted by mysql
    */
   static function processDate($date, $time = NULL, $returnNullString = FALSE, $format = 'YmdHis') {
     $mysqlDate = NULL;
@@ -1459,9 +1471,13 @@ class CRM_Utils_Date {
   /**
    *  Function to convert mysql to date plugin format
    *
-   *  @param string $mysqlDate date string
+   * @param string $mysqlDate date string
+   *
+   * @param null $formatType
+   * @param null $format
+   * @param null $timeFormat
    *
-   *  @return array $date and time
+   * @return array $date and time
    */
   static function setDateDefaults($mysqlDate = NULL, $formatType = NULL, $format = NULL, $timeFormat = NULL) {
     // if date is not passed assume it as today