I forgot the global statement below. On Fri, Sep 4, 2009 at 10:20 AM, Peter Bowers<[email protected]> 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; > } _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
