com.ibm.ulc.ui.dataTypes
Class UISimpleDateFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--java.text.DateFormat
              |
              +--java.text.SimpleDateFormat
                    |
                    +--com.ibm.ulc.ui.dataTypes.UISimpleDateFormat

public class UISimpleDateFormat
extends java.text.SimpleDateFormat

See Also:
Serialized Form

Field Summary
protected static int[] defaultingFields
           
 
Fields inherited from class java.text.DateFormat
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
 
Constructor Summary
UISimpleDateFormat()
          UiSimpleDateFormat constructor comment.
UISimpleDateFormat(java.lang.String pattern)
          UiSimpleDateFormat constructor comment.
UISimpleDateFormat(java.lang.String pattern, java.text.DateFormatSymbols formatData)
          UiSimpleDateFormat constructor comment.
UISimpleDateFormat(java.lang.String pattern, java.util.Locale loc)
          UiSimpleDateFormat constructor comment.
 
Method Summary
 java.util.Date parse(java.lang.String text, java.text.ParsePosition pos)
          Parse a date/time string.
 
Methods inherited from class java.text.SimpleDateFormat
applyLocalizedPattern, applyPattern, clone, equals, format, get2DigitYearStart, getDateFormatSymbols, hashCode, set2DigitYearStart, setDateFormatSymbols, toLocalizedPattern, toPattern
 
Methods inherited from class java.text.DateFormat
format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone
 
Methods inherited from class java.text.Format
format, parseObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultingFields

protected static int[] defaultingFields
Constructor Detail

UISimpleDateFormat

public UISimpleDateFormat()
UiSimpleDateFormat constructor comment.

UISimpleDateFormat

public UISimpleDateFormat(java.lang.String pattern)
UiSimpleDateFormat constructor comment.
Parameters:
pattern - java.lang.String

UISimpleDateFormat

public UISimpleDateFormat(java.lang.String pattern,
                          java.text.DateFormatSymbols formatData)
UiSimpleDateFormat constructor comment.
Parameters:
pattern - java.lang.String
formatData - java.text.DateFormatSymbols

UISimpleDateFormat

public UISimpleDateFormat(java.lang.String pattern,
                          java.util.Locale loc)
UiSimpleDateFormat constructor comment.
Parameters:
pattern - java.lang.String
loc - java.util.Locale
Method Detail

parse

public java.util.Date parse(java.lang.String text,
                            java.text.ParsePosition pos)
Parse a date/time string. (see superclass) We take the calendar field as left from the super method, and change the "defaulting" (=DAY_OF_MONTH,MONTH,YEAR) fields, that are not set, to be the same as in the current date. To do these changes we use the same technique used in super for the defaultCenturyStart. Note: We do not reconstruct the complex defaultCenturyStart behavior for the first part of the defaultCenturyStart year. I.e. if today is 22 Nov 1999, Input = '01.01.00' ----> ReturnedDate = 01.01.2000 ... Input = '31.12.18' ----> ReturnedDate = 31.12.2018 Input = '01.01.19' ----> ReturnedDate = 01.01.1919 <<< super returns 01.01.2019 Input = '22.11.19' ----> ReturnedDate = 22.11.1919 <<< super returns 22.11.2019 Input = '23.11.19' ----> ReturnedDate = 23.11.1919 Input = '31.12.19' ----> ReturnedDate = 31.12.1919 I.e. something slightly more than the last 80 years are the default.
Overrides:
parse in class java.text.SimpleDateFormat