From: Peter B. <mr_...@us...> - 2005-10-11 13:00:22
|
Update of /cvsroot/stud/stud In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13652 Modified Files: ClubDb.pm Log Message: RFE:528049, updated statistics to support future dates Index: ClubDb.pm =================================================================== RCS file: /cvsroot/stud/stud/ClubDb.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ClubDb.pm 8 Dec 2004 15:37:02 -0000 1.23 --- ClubDb.pm 11 Oct 2005 13:00:19 -0000 1.24 *************** *** 1891,1894 **** --- 1891,1895 ---- # $category Id of the category to get information about. 0 = ALL # $period Number of days for the period which some statistics is gathered for + # Negative value for the past, positive for the future. #@return Hash with "club-category-item" as key to an array with # Name of item, number of bookings, number of booked days, number of booked days last $period days, number of bookings last period *************** *** 1948,1953 **** } ! my ($period_end_year, $period_end_month, $period_end_day) = Today(); ! my ($period_start_year, $period_start_month, $period_start_day) = Add_Delta_Days($period_end_year, $period_end_month, $period_end_day, -$period + 1); foreach(@$bookings) { --- 1949,1965 ---- } ! my ($period_end_year, $period_end_month, $period_end_day); ! my ($period_start_year, $period_start_month, $period_start_day); ! ! if ($period > 0) ! { ! ($period_end_year, $period_end_month, $period_end_day) = Today(); ! ($period_start_year, $period_start_month, $period_start_day) = Add_Delta_Days($period_end_year, $period_end_month, $period_end_day, -$period + 1); ! } ! else ! { ! ($period_start_year, $period_start_month, $period_start_day) = Today(); ! ($period_end_year, $period_end_month, $period_end_day) = Add_Delta_Days($period_start_year, $period_start_month, $period_start_day, -$period); ! } foreach(@$bookings) { |