Date.Hours Property

Definition

Caution

deprecated

Returns the hour represented by this Date object. -or- Sets the hour of this Date object to the specified value.

[System.Obsolete("deprecated")]
public virtual int Hours { [Android.Runtime.Register("getHours", "()I", "GetGetHoursHandler")] get; [Android.Runtime.Register("setHours", "(I)V", "GetSetHours_IHandler")] set; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getHours", "()I", "GetGetHoursHandler")>]
[<set: Android.Runtime.Register("setHours", "(I)V", "GetSetHours_IHandler")>]
member this.Hours : int with get, set

Property Value

the hour represented by this date.

Attributes

Remarks

Property getter documentation:

Returns the hour represented by this Date object. The returned value is a number (0 through 23) representing the hour within the day that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.

This member is deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY).

Java documentation for java.util.Date.getHours().

Property setter documentation:

Sets the hour of this Date object to the specified value. This Date object is modified so that it represents a point in time within the specified hour of the day, with the year, month, date, minute, and second the same as before, as interpreted in the local time zone.

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

Java documentation for java.util.Date.setHours(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