Java.Text.SimpleDateFormat.Set2DigitYearStart Method
Sets the date which is the start of the one hundred year period for two-digit year values.

Syntax

[Android.Runtime.Register("set2DigitYearStart", "(Ljava/util/Date;)V", "GetSet2DigitYearStart_Ljava_util_Date_Handler")]
public virtual void Set2DigitYearStart (Java.Util.Date date)

Parameters

date
Documentation for this section has not yet been entered.

Remarks

Sets the date which is the start of the one hundred year period for two-digit year values.

When parsing a date string using the abbreviated year pattern yy, SimpleDateFormat must interpret the abbreviated year relative to some century. It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance was created. For example, using a pattern of MM/dd/yy, an instance created on Jan 1, 1997 would interpret the string "01/11/12" as Jan 11, 2012 but interpret the string "05/04/64" as May 4, 1964. During parsing, only strings consisting of exactly two digits, as defined by Java.Lang.Character.IsDigit(char), will be parsed into the default century. Any other numeric string, such as a one digit string, a three or more digit string, or a two digit string that isn't all digits (for example, "-1"), is interpreted literally. So using the same pattern, both "01/02/3" and "01/02/003" are parsed as Jan 2, 3 AD. Similarly, "01/02/-3" is parsed as Jan 2, 4 BC.

If the year pattern does not have exactly two 'y' characters, the year is interpreted literally, regardless of the number of digits. So using the pattern MM/dd/yyyy, "01/11/12" is parsed as Jan 11, 12 A.D.

[Android Documentation]

Requirements

Namespace: Java.Text
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1