Logo Search packages:      
Sourcecode: icu version File versions

void SimpleDateFormat::set2DigitYearStart ( UDate  d,
UErrorCode status 
) [virtual]

Set the start UDate used to interpret two-digit year strings. When dates are parsed having 2-digit year strings, they are placed within a assumed range of 100 years starting on the two digit start date. For example, the string "24-Jan-17" may be in the year 1817, 1917, 2017, or some other year. SimpleDateFormat chooses a year so that the resultant date is on or after the two digit start date and within 100 years of the two digit start date.

By default, the two digit start date is set to 80 years before the current time at which a SimpleDateFormat object is created.

Parameters:
dstart UDate used to interpret two-digit year strings.
statusFilled in with U_ZERO_ERROR if the parse was successful, and with an error value if there was a parse error. ICU 2.0

Definition at line 2512 of file smpdtfmt.cpp.

References parseAmbiguousDatesAsAfter().

Referenced by DateFormatRegressionTest::Test4056591(), IntlTestSimpleDateFormatAPI::testAPI(), and IntlTestDateFormatAPI::TestEquals().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index