hour()

Input / Time & Date

Description

Returns the current hour as a value from 0 to 23.

Syntax

int hour()

Parameters

None

Returns

int

Related

Under the Hood

From Processing.h:

inline int hour() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_hour; } static int hour() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_hour; }