month()

Input / Time & Date

Description

Returns the current month as a value from 1 to 12.

Syntax

int month()

Parameters

None

Returns

int

Related

Under the Hood

From Processing.h:

inline int month() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_mon+1; } static int month() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_mon+1; }