Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Is there any Perl function to check current year?

asked May 13, 2016 by sandeepkapalawai Bronze (1,475 points)

1 Answer

+1 vote
 
Best answer
You can use this:

<input name=time2_c type=text value="

 [%  
Begin Unverified Perl  
my ($d,$m,$y) = (localtime)[3,4,5];
my $d = sprintf '%d',$y+1900;

End Unverified  
%]  
" readonly>  
</input>
answered May 13, 2016 by Saurabh Aggarwal Gold (29,735 points)
selected May 13, 2016 by sandeepkapalawai
...