Megosztás a következőn keresztül:


Date.SetDate(Int32) Method

Definition

Caution

deprecated

Sets the day of the month of this Date object to the specified value.

[Android.Runtime.Register("setDate", "(I)V", "GetSetDate_IHandler")]
[System.Obsolete("deprecated")]
public virtual void SetDate (int date);
[<Android.Runtime.Register("setDate", "(I)V", "GetSetDate_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member SetDate : int -> unit
override this.SetDate : int -> unit

Parameters

date
Int32

the day of the month value between 1-31.

Attributes

Remarks

Sets the day of the month of this Date object to the specified value. This Date object is modified so that it represents a point in time within the specified day of the month, with the year, month, hour, minute, and second the same as before, as interpreted in the local time zone. If the date was April 30, for example, and the date is set to 31, then it will be treated as if it were on May 1, because April has only 30 days.

This member is deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).

Java documentation for java.util.Date.setDate(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to