getHour
La fonction getHour() renvoie l'heure (0–23) d'un TheDate, ajustée selon un fuseau horaire optionnel.
Exemple interactif
Syntaxe
typescript
function getHour<
GenericInput extends TheDate | SerializedTheDate
>(
input: GenericInput,
timezone: Timezone = "UTC"
): numberParamètres
input:TheDateouSerializedTheDate.timezone: Fuseau horaire IANA. Par défaut :"UTC".
Valeur de retour
Un entier entre 0 et 23.
