i needed some help in figuring out how to work out the Leap year for the next and previous years if the entered date is not a leap year.
for e.g. = 1993 is not a leap year, the next leap year is 1996 and the previous leap year is 1992.
<form>
<input type="text" name="year">
<input type="submit" name="Leap Year?">
</form>
{*Variables*}
{$ca.LeapYearYes = {$ca.year%400==0||(($ca.year%4==0)&&($ca.year%100!=0))}}
{$ca.NextLeapYear = {$ca.year + 4}}
{$ca.PreviousLeapYear = {$ca.year - 4}}
{$ca.LeapYearNo1 = {$ca.year + 1}}
{if $ca.LeapYearYes}
This is a Leap Year!</br>
The Next Leap Year is {$ca.NextLeapYear} </br>
The Previous Leap Year was {$ca.PreviousLeapYear} </br>
{else}
{$ca.LeapYearYes = false}
{$ca.year} is not a Leap Year</br>
The Next Leap Year is
{if $ca.LeapYearYes = false}
{$ca.LeapYearNo1}
{elseif $ca.year = true}
{$ca.LeapYearYes}
{/if}
{$ca.year}
{/if}
</div>```