mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
74 lines
1.1 KiB
XML
74 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>month()</name>
|
|
|
|
<category>Input/Output</category>
|
|
|
|
<subcategory>Time & Date</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image>month_.jar</image>
|
|
<code>
|
|
void setup() {
|
|
PFont 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);
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Processing communicates with the clock on your computer. The <b>month()</b> function returns the current month as a value from 1 - 12.
|
|
</description>
|
|
|
|
<syntax>
|
|
month()
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label></label>
|
|
<description></description>
|
|
</parameter>
|
|
|
|
<returns>int</returns>
|
|
|
|
<related>
|
|
millis()
|
|
second()
|
|
minute()
|
|
hour()
|
|
day()
|
|
month()
|
|
year()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|