[ Web Proxy ]
URL:
Viewing: https://processing.org/reference/day_.html [Back]  [Original]

day() / Reference / Processing.org
Skip to main content

Name

day()

Description

Processing communicates with the clock on your computer. The day() function returns the current day as a value from 1 to31.

Examples

  • Copy
    int d = day();    // Values from 1 - 31
    int m = month();  // Values from 1 - 12
    int y = year();   // 2003, 2004, 2005, etc.
    
    String s = String.valueOf(d);
    text(s, 10, 28);
    s = String.valueOf(m);
    text(s, 10, 56); 
    s = String.valueOf(y);
    text(s, 10, 84);
    

Syntax

  • day()

Return

  • int

Web Proxy Viewer  |  New URL  |  Original Page