Skip to content

Commit

Permalink
Access directly the static fields.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cocoon/trunk/blocks@479300 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Antonio Gallardo Rivera committed Nov 26, 2006
1 parent 5d3e817 commit c1758c7
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.cocoon.forms.samples;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

Expand All @@ -42,9 +43,9 @@ public boolean validate(Widget widget) {
getLogger().debug("Validating date " + birthDate);
}
GregorianCalendar cal = new GregorianCalendar();
cal.add(GregorianCalendar.YEAR, -5);
cal.add(Calendar.YEAR, -5);
Date maxDate = cal.getTime();
cal.add(GregorianCalendar.YEAR, -95);
cal.add(Calendar.YEAR, -95);
Date minDate = cal.getTime();
if (birthDate.after(maxDate) || birthDate.before(minDate)) {
if (widget instanceof ValidationErrorAware) {
Expand Down

0 comments on commit c1758c7

Please sign in to comment.