You can get the last digit using something like
echo -a $right( $time(n), 1)
and to check if something is even, you check if its a multiple of 2
if (2 // $right( $time(n), 1)) {
echo -a even
}
else {
echo -a odd
}
References:
/help $right
/help $asctime
/help if-then-else