Beispiel #1
0
 /**
  * Returns date of the first day of previous month of given date
  *
  * @param mixed  $dummy  irrelevant parameter
  * @param int    $month  the month, default is current local month
  * @param int    $year   the year in four digit format, default is current
  *                        local year
  * @param string $format the string indicating how to format the output
  *
  * @return     string     the date in the desired format
  * @access     public
  * @static
  * @see        Date_Calc::beginOfMonthBySpan()
  * @deprecated Method deprecated in Release 1.4.4
  */
 function beginOfPrevMonth($dummy = null, $month = 0, $year = null, $format = DATE_CALC_FORMAT)
 {
     if (is_null($year)) {
         $year = Date_Calc::dateNow('%Y');
     }
     if (empty($month)) {
         $month = Date_Calc::dateNow('%m');
     }
     list($hn_pmyear, $hn_prevmonth) = Date_Calc::prevMonth($month, $year);
     return Date_Calc::dateFormat(Date_Calc::getFirstDayOfMonth($hn_prevmonth, $hn_pmyear), $hn_prevmonth, $hn_pmyear, $format);
 }