[ic] Date widget reverse years
Jon Jensen
jon at endpoint.com
Tue Sep 19 14:49:16 EDT 2006
On Tue, 19 Sep 2006, Bill Carr wrote:
> 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>};
That looks good to me, Bill. I added it to CVS.
If anyone knows of any problems this could cause elsewhere, please let us
know.
Thanks,
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
More information about the interchange-users
mailing list