1 57 58 package org.enhydra.apache.xerces.validators.datatype; 59 60 import java.util.Hashtable ; 61 62 63 69 public class DateTimeDatatypeValidator extends DateTimeValidator { 70 71 public DateTimeDatatypeValidator() throws InvalidDatatypeFacetException{ 72 super(); 73 } 74 75 76 public DateTimeDatatypeValidator ( DatatypeValidator base, Hashtable facets, 77 boolean derivedByList ) throws InvalidDatatypeFacetException { 78 super (base, facets, derivedByList); 79 } 80 81 90 protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ 91 resetBuffer(str); 92 93 if ( date == null ) { 95 date = new int[TOTAL_SIZE]; 96 } 97 resetDateObj(date); 98 int end = indexOf (fStart, fEnd, 'T'); 99 100 getDate(fStart, end, date); 102 getTime(end+1, fEnd, date); 103 104 106 validateDateTime(date); 108 109 110 if ( (date[utc]!=0 && date[utc]!='Z') || date[h] == 24 ) { 111 normalize(date); 112 } 113 return date; 114 } 115 116 117 } 118 119 120 | Popular Tags |