System.SysUtils.TFormatSettings.TwoDigitYearCenturyWindow
Delphi
TwoDigitYearCenturyWindow: Word;
C++
System::Word TwoDigitYearCenturyWindow;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
field | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TFormatSettings |
Description
Used internally to determine the century of two-digit years when string dates are converted to numeric dates.
If the value of TwoDigitYearCenturyWindow is nonzero, then it is subtracted from the current year to calculate the floating "pivot", prior to which two-digit years are interpreted as pertaining to the next century. By default, the value is 50.
The following table shows some examples:
Current Year | TwoDigitCenturyWindow Value | Century "Pivot" | StrToDate('01/01/03') | StrToDate('01/01/68') | StrToDate('01/01/50') |
---|---|---|---|---|---|
1998 |
0 |
1900 |
1903 |
1968 |
1950 |
1998 |
50 |
2000 |
2003 |
1968 |
1950 |
2020 |
50 |
1970 |
2003 |
2068 |
2050 |