classes/raphaelizerPiwikStats.class.php
/**
   * (str)convertPiwikDate((str)str)
   *
   * converts the timestring delivered by Pikwik to something more readable
   *
   * @author DECAF
   **/
(str)convertPiwikDate((str)str)
converts the timestring delivered by Pikwik to something more readable

@author DECAF
( str ) convertPiwikDate (( str ) str ) converts the timestring delivered by Pikwik to something more readable @author DECAF
private function convertPiwikDate($str)
  {
    $retval = $str;
    $date = date_parse($str);
    if (strpos($str,'to')) 
    {
      $retval = date($this->I18N->msg('date_format_week'), mktime(0,0,0,$date['month'], $date['day'], $date['year']));
    } else {
      if (!$date['error_count'] && strlen($str) == 10) 
      {
        $retval = date($this->I18N->msg('date_format_day'), mktime(0,0,0,$date['month'], $date['day'], $date['year']));
      }
      if (!$date['error_count'] && strlen($str) == 7) 
      {
        $retval = date($this->I18N->msg('date_format_month'), mktime(0,0,0,$date['month'], 1, $date['year']));
      }
    }
    return $retval;
  }
private function convertPiwikDate ( $ str ) { $ retval = $ str ; $ date = date_parse ( $ str ) ; if ( strpos ( $ str , 'to' ) ) { $ retval = date ( $ this -> I18N -> msg ( 'date_format_week' ) , mktime ( 0 , 0 , 0 , $ date [ 'month' ] , $ date [ 'day' ] , $ date [ 'year' ] ) ) ; } else { if ( ! $ date [ 'error_count' ] && strlen ( $ str ) == 10 ) { $ retval = date ( $ this -> I18N -> msg ( 'date_format_day' ) , mktime ( 0 , 0 , 0 , $ date [ 'month' ] , $ date [ 'day' ] , $ date [ 'year' ] ) ) ; } if ( ! $ date [ 'error_count' ] && strlen ( $ str ) == 7 ) { $ retval = date ( $ this -> I18N -> msg ( 'date_format_month' ) , mktime ( 0 , 0 , 0 , $ date [ 'month' ] , 1 , $ date [ 'year' ] ) ) ; } } return $ retval ; }
(str)convertPiwikDate((str)str)
 converts the timestring delivered by Pikwik to something more readable
( str ) convertPiwikDate (( str ) str ) converts the timestring delivered by Pikwik to something more readable
// probably a week // this is a day // this is a month