[ic] Date widget reserves years when not wanted

David Christensen david at endpoint.com
Thu Apr 15 15:38:00 UTC 2010


On Apr 15, 2010, at 10:23 AM, Bill Carr wrote:

> Vend::Form.pm Line 536:
> 		@Years = $by <= $ey ? ($by .. $ey) : reverse ($ey .. $by);
> 
> Could we change to:
> 	@Years = $by .. $ey;


The .. operator does not work unless the first operand is smaller than the second; i.e., it only increases.  If you want something like that, you'd need to reverse the results of @Years, not the order of the operands.

$ perl -le 'print $_ for 1..5'                                                                                                                                 
1                                                                                                                                                                               
2
3
4
5

$ perl -le 'print $_ for 5..1'                                                                                                                                 
$

Regards,

David
--
David Christensen
End Point Corporation
david at endpoint.com







More information about the interchange-users mailing list