Back to Index

Definition: hour() — Allowed: no arguments; Not allowed: any arguments.

Returns the local hour (0-23). Returns -1 if local time is not available.

Example

if (hour() >= 18) {
  logn("After 6pm");
}