[pmwiki-users] pagelist order=month?
    Peter Bowers 
    pbowers at pobox.com
       
    Fri Sep  4 09:21:42 CDT 2009
    
    
  
I forgot the global statement below.
On Fri, Sep 4, 2009 at 10:20 AM, Peter Bowers<pbowers at pobox.com> wrote:
> Here's a quick shot at modifying the examples on that page...
...
> function YearMonthDayComp($x, $y) {
global $Months;
>      ## compare the $:Year values
>      $c = strcmp(PageVar($x, '$:Year'), PageVar($y, '$:Year'));
>      if ($c != 0) return $c;
>
>      ## compare the $:Month values
>      $c = $Months[strtolower(PageVar($x, '$:Month'))] -
> $Months[strtolower(PageVar($y, '$:Month'))]
>      if ($c != 0) return $c;
>
>      ## compare the $:Day values
>      $c = intval(PageVar($x, '$:Day')) - intval(PageVar($y, '$:Day')));
>      return $c;
> }
    
    
More information about the pmwiki-users
mailing list