10public static const int ERA;
12public static const int YEAR;
20public static const int DATE;
32public static const int HOUR;
70public static const int MAY;
72public static const int JUNE;
74public static const int JULY;
88public static const int AM;
90public static const int PM;
98public static const int LONG;
134public int get(
int field);
141public void set(
int field,
int value);
149public void set(
int year,
int month,
int date);
160public void set(
int year,
int month,
int date,
int hourOfDay,
int minute,
int second);
static const int NOVEMBER
十一月常量。
static const int DAY_OF_MONTH
月中的天字段常量。
static const int SEPTEMBER
九月常量。
static const int DATE
日期字段常量。
String getTime()
获取当前时间的字符串表示。
static const int JUNE
六月常量。
static const int SHORT_FORMAT
简短格式样式常量。
static const int SATURDAY
星期六常量。
void setTime(String date, String format)
通过字符串设置时间。
static const int DAY_OF_YEAR
年中的天字段常量。
static const int THURSDAY
星期四常量。
static const int FEBRUARY
二月常量。
static const int DAY_OF_WEEK_IN_MONTH
月中的星期字段常量。
static const int DECEMBER
十二月常量。
void finalize()
释放资源,进行对象终结。
void clear(int field)
清除指定字段的值。
static const int YEAR
年份字段常量。
static const int WEDNESDAY
星期三常量。
static const int ALL_STYLES
所有样式常量。
static const int SHORT_STANDALONE
简短独立样式常量。
void setTimeInMillis(long millis)
设置时间(毫秒)。
static const int SHORT
简短样式常量。
static const int UNDECIMBER
第十三月常量(用于某些历法)。
static const int SECOND
秒字段常量。
int getTimeZoneOffset()
获取时区偏移量。
static const int ERA
纪元字段常量。
static const int JANUARY
一月常量。
static const int WEEK_OF_YEAR
年中的周字段常量。
int compareTo(Calendar another)
比较两个Calendar对象的时间先后。
static const int DAY_OF_WEEK
星期字段常量。
static const int MILLISECOND
毫秒字段常量。
static const int AM_PM
上午/下午字段常量。
static const int STANDALONE_MASK
独立样式掩码常量。
static const int APRIL
四月常量。
static const int TUESDAY
星期二常量。
long getTimeInMillis()
获取当前时间(毫秒)。
static const int MONTH
月份字段常量。
static const int WEEK_OF_MONTH
月中的周字段常量。
static const int LONG_FORMAT
长格式样式常量。
static const int ZONE_OFFSET
时区偏移字段常量。
static const int SUNDAY
星期日常量。
static const int MONDAY
星期一常量。
static const int FIELD_COUNT
字段总数常量。
static const int AUGUST
八月常量。
static const int NARROW_STANDALONE
狭窄独立样式常量。
static const int JULY
七月常量。
static const int HOUR
小时字段常量(12小时制)。
static const int OCTOBER
十月常量。
static const int NARROW_FORMAT
狭窄格式样式常量。
static final Calendar getInstance()
获取默认的Calendar实例。
static final Calendar getInstance(int offset)
获取指定时区的Calendar实例。
static const int HOUR_OF_DAY
小时字段常量(24小时制)。
static const int FRIDAY
星期五常量。
String toString()
获取Calendar对象的字符串表示。
static const int MAY
五月常量。
static const int LONG_STANDALONE
长独立样式常量。
static const int LONG
长样式常量。
static const int DST_OFFSET
夏令时偏移字段常量。
static const int MINUTE
分钟字段常量。
static const int MARCH
三月常量。
Calendar()
构造一个新的Calendar对象,初始化为当前时间。
void setTimeZoneOffset(int offset)
设置时区偏移量。