hour property

int get hour

The hour component of the time (0–23).

Example:

final dt = LocalDateTime.of(2025, 6, 27, 14, 30);
final hour = dt.hour;

Implementation

int get hour => time.hour;