Sky View Café - Java

org.shetline.util
Class DateUtil.DateParser

java.lang.Object
  extended by org.shetline.util.DateUtil.DateParser
Enclosing class:
DateUtil

protected static class DateUtil.DateParser
extends Object


Nested Class Summary
protected static class DateUtil.DateParser.BadDateException
           
protected static class DateUtil.DateParser.DateParseException
           
protected static class DateUtil.DateParser.StyleException
           
 
Field Summary
protected  boolean allowYearOnly
           
protected  GregorianCalendar calendar
           
protected  boolean canParseLoosely
           
protected  String country
           
protected  Date date
           
protected  int dateIndex
           
protected  String dateToParse
           
protected  int dayOfWeekIndex
           
protected  String era
           
protected  String eraAD
           
protected  String eraBC
           
protected  int eraIndex
           
protected  int firstYearForTwoDigitYear
           
protected  DateFormat format
           
protected  DateUtil.StringList formatParts
           
protected  String formatStr
           
protected  DateUtil.DatePartTypeList formatTypes
           
protected  int[] gregorianChange
           
protected  boolean hasChineseDelims
           
protected  boolean hasKoreanDelims
           
protected  boolean hasWordDelims
           
protected  boolean ignoreWordDelims
           
protected  String inputDate
           
protected  boolean inputLongYear
           
protected  Vector<String> inputParts
           
protected  boolean inputWordDelims
           
protected  String inStandardFormat
           
protected  String language
           
protected  int likelyDateIndex
           
protected  int likelyDayOfWeekIndex
           
protected  int likelyMonthIndex
           
protected  int likelyYearIndex
           
protected  Locale locale
           
protected  boolean longMonth
           
protected  boolean longYear
           
protected  boolean lookingForLongMonth
           
protected  boolean lookingForMediumMonth
           
protected  boolean modified
           
protected  int monthIndex
           
protected  boolean nonPositiveYears
           
protected  DateFormat origFormat
           
protected  String reformatted
           
protected  SimpleDateFormat sdFormat
           
protected  int style
           
protected static int[] styles
           
protected  int yearIndex
           
protected  int yearPartIndex
           
protected  TimeZone zone
           
 
Constructor Summary
DateUtil.DateParser(Object... args)
           
 
Method Summary
protected  void analyzeTrialFormat()
           
protected  void attemptParsingInputDate()
           
protected  void decomposeInputDate()
           
protected  void decomposeTrialFormat()
           
protected  void determineLikelyYearMonthDayOrder()
           
protected  int eraLookAhead(String part, int offset, DateUtil.StringSet eras)
           
protected  int eraMatch(String e1, String e2)
           
protected  DateUtil.DateInfo getDateInfo()
           
protected  void initializeTrialStyle(int aStyle)
           
 DateUtil.DateInfo parse(String dateStr)
           
protected  DateUtil.DateInfo parseYearOnlyDate()
           
protected  void prepareCalendar()
           
protected  void prepareTwoDigitYearParsing()
           
protected  void recomposeTrialFormatAndInputDate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowYearOnly

protected boolean allowYearOnly

calendar

protected GregorianCalendar calendar

canParseLoosely

protected boolean canParseLoosely

country

protected String country

date

protected Date date

dateIndex

protected int dateIndex

dateToParse

protected String dateToParse

dayOfWeekIndex

protected int dayOfWeekIndex

era

protected String era

eraAD

protected String eraAD

eraBC

protected String eraBC

eraIndex

protected int eraIndex

firstYearForTwoDigitYear

protected int firstYearForTwoDigitYear

format

protected DateFormat format

formatParts

protected DateUtil.StringList formatParts

formatStr

protected String formatStr

formatTypes

protected DateUtil.DatePartTypeList formatTypes

gregorianChange

protected int[] gregorianChange

hasChineseDelims

protected boolean hasChineseDelims

hasKoreanDelims

protected boolean hasKoreanDelims

hasWordDelims

protected boolean hasWordDelims

ignoreWordDelims

protected boolean ignoreWordDelims

inputDate

protected String inputDate

inputLongYear

protected boolean inputLongYear

inputParts

protected Vector<String> inputParts

inputWordDelims

protected boolean inputWordDelims

inStandardFormat

protected String inStandardFormat

language

protected String language

likelyDateIndex

protected int likelyDateIndex

likelyDayOfWeekIndex

protected int likelyDayOfWeekIndex

likelyMonthIndex

protected int likelyMonthIndex

likelyYearIndex

protected int likelyYearIndex

locale

protected Locale locale

longMonth

protected boolean longMonth

longYear

protected boolean longYear

lookingForLongMonth

protected boolean lookingForLongMonth

lookingForMediumMonth

protected boolean lookingForMediumMonth

modified

protected boolean modified

monthIndex

protected int monthIndex

nonPositiveYears

protected boolean nonPositiveYears

origFormat

protected DateFormat origFormat

reformatted

protected String reformatted

sdFormat

protected SimpleDateFormat sdFormat

style

protected int style

yearIndex

protected int yearIndex

yearPartIndex

protected int yearPartIndex

zone

protected TimeZone zone

styles

protected static final int[] styles
Constructor Detail

DateUtil.DateParser

public DateUtil.DateParser(Object... args)
Method Detail

parse

public DateUtil.DateInfo parse(String dateStr)

parseYearOnlyDate

protected DateUtil.DateInfo parseYearOnlyDate()

initializeTrialStyle

protected void initializeTrialStyle(int aStyle)

decomposeTrialFormat

protected void decomposeTrialFormat()
                             throws DateUtil.DateParser.DateParseException
Throws:
DateUtil.DateParser.DateParseException

analyzeTrialFormat

protected void analyzeTrialFormat()
                           throws DateUtil.DateParser.DateParseException
Throws:
DateUtil.DateParser.DateParseException

decomposeInputDate

protected void decomposeInputDate()

eraLookAhead

protected int eraLookAhead(String part,
                           int offset,
                           DateUtil.StringSet eras)

eraMatch

protected int eraMatch(String e1,
                       String e2)

determineLikelyYearMonthDayOrder

protected void determineLikelyYearMonthDayOrder()
                                         throws DateUtil.DateParser.DateParseException
Throws:
DateUtil.DateParser.DateParseException

recomposeTrialFormatAndInputDate

protected void recomposeTrialFormatAndInputDate()
                                         throws DateUtil.DateParser.DateParseException
Throws:
DateUtil.DateParser.DateParseException

prepareTwoDigitYearParsing

protected void prepareTwoDigitYearParsing()

prepareCalendar

protected void prepareCalendar()

attemptParsingInputDate

protected void attemptParsingInputDate()
                                throws DateUtil.DateParser.DateParseException
Throws:
DateUtil.DateParser.DateParseException

getDateInfo

protected DateUtil.DateInfo getDateInfo()

Sky View Café - Java