[ic] Date widget reverse years

Bill Carr bill at bottlenose-wine.com
Tue Sep 19 12:11:28 EDT 2006


I could not find a way to reverse sort the years in the date widget.  
This patch allows year_end to be less than year_begin and will sort  
the years in reverse order (latest to earliest).

--- /usr/local/interchange-5.4.0-orig/lib/Vend/Form.pm  2005-11-30  
10:01:56.000000000 -0500
+++ /usr/lib/interchange/Vend/Form.pm   2006-09-19 11:34:08.000000000  
-0400
@@ -506,7 +506,7 @@
                 if($ey < 100) {
                         $ey += $cy;
                 }
-               @Years = ($by .. $ey);
+               @Years = $by <= $ey ? ($by .. $ey) : reverse ($ey ..  
$by);
         }
         if ($opt->{blank}) {
                 $out .= qq{<option value="0000"$opt_extra>----</ 
option>};


Bill Carr
Bottlenose - Wine & Spirits eBusiness Specialists
(877) 857-6700
http://www.bottlenose-wine.com



More information about the interchange-users mailing list