note
AnomalousMonk
<p>
One can also take another tack and use a series of statements like
</P>
<c>
next if not proper_year($year);
next if not proper_month($month_nr);
next if not proper_day($day_in_month, $month_nr, $year);
</C>
<p>
which might be said to offer the best of both concision (it's self-documenting, or can be made so) and encapsulation (annual, monthly and daily proprieties defined in one place in their respective validation functions). This sort of approach is what I usually prefer if I have the opportunity to take a second pass at a program and consolidate.
</P>
<p>
Then there's the OO approach...
</P>
1073598
1073688