Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

year()

   
Examples  
void setup() { 
  BFont metaBold; 
  metaBold = loadFont("fonts/Meta-Bold.vlw.gz"); 
  setFont(metaBold, 44); 
  hint(SMOOTH_IMAGES); 
} 
 
void loop() { 
  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); 
} 
 
Description   Processing communicates with the clock on your computer. The year() function returns the current year as an integer (2003, 2004, 2005, etc).
   
Syntax  
year()
   
Returns   int
   
Usage   Web & Application
   
Related   millis()
second()
minute()
hour()
day()
month()
year()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas