getHours

Commons
stable

Returns the hour (0–23) for a given Date object. Thin wrapper around Date.prototype.getHours() used by the TimePicker component.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

date
requis
Date
A JavaScript Date instance from which the hour value is extracted.

API

Valeur de retour

La valeur retournée par cet util.

Integer between 0 and 23 representing the hour of the day in local time.

Usage

Exemples

Extraits de code prêts à coller.

Extract hour from a Date

typescript