public static Date fromISO8601Jackson(char[] charArray, int from, int to) { if (isISO8601Jackson(charArray, from, to)) { int year = CharScanner.parseInt(charArray, from + 0, from + 4); int month = CharScanner.parseInt(charArray, from + 5, from + 7);
public static Date fromISO8601Jackson(char[] charArray, int from, int to) { if ( isISO8601Jackson(charArray, from, to) ) { int year = CharScanner.parseInt(charArray, from + 0, from + 4); int month = CharScanner.parseInt(charArray, from + 5, from + 7);
@Override public Date dateValue () { if ( type == TypeType.STRING ) { if ( Dates.isISO8601QuickCheck ( buffer, startIndex, endIndex ) ) { if ( Dates.isJsonDate ( buffer, startIndex, endIndex ) ) { return Dates.fromJsonDate ( buffer, startIndex, endIndex ); } else if ( Dates.isISO8601Jackson(buffer, startIndex, endIndex) ) { return Dates.fromISO8601Jackson(buffer, startIndex, endIndex); } else if ( Dates.isISO8601 ( buffer, startIndex, endIndex ) ) { return Dates.fromISO8601 ( buffer, startIndex, endIndex ); } else { throw new IllegalStateException( "Unable to convert " + stringValue () + " to date " ); } } else { throw new IllegalStateException ( "Unable to convert " + stringValue () + " to date " ); } } else { return new Date ( Dates.utc ( longValue () ) ); } }
@Override public Date dateValue () { if ( type == TypeType.STRING ) { if ( Dates.isISO8601QuickCheck ( buffer, startIndex, endIndex ) ) { if ( Dates.isJsonDate ( buffer, startIndex, endIndex ) ) { return Dates.fromJsonDate ( buffer, startIndex, endIndex ); } else if ( Dates.isISO8601Jackson(buffer, startIndex, endIndex) ) { return Dates.fromISO8601Jackson(buffer, startIndex, endIndex); } else if ( Dates.isISO8601 ( buffer, startIndex, endIndex ) ) { return Dates.fromISO8601 ( buffer, startIndex, endIndex ); } else { throw new IllegalStateException( "Unable to convert " + stringValue () + " to date " ); } } else { throw new IllegalStateException ( "Unable to convert " + stringValue () + " to date " ); } } else { return new Date ( Dates.utc ( longValue () ) ); } }