首页 > 文档 > year()年
2017
08-01

year()年

Name

year()

   

Examples

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).

处理与计算机上的时钟进行通信。年 () 函数将当前年份作为整数 (200320042005) 返回。

Syntax

year()

Returns

int

Related

millis()
second()
minute()
hour()
day()
month()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。