import java.util.*;
GregorianCalendar gc = new GregorianCalendar();
int today = gc.get(DAY_OF_YEAR);
//得到今天的日期,特定日期的也差不多,改个构造函数
GregorianCalendar gc = new GregorianCalendar();
int today = gc.get(DAY_OF_YEAR);
//得到今天的日期,特定日期的也差不多,改个构造函数
解决方案 »
- java执行jar文件
- 实现将整型数字字符串转换为整型数字的函数
- 怎样实现在敲回车键时将文本框中的光标移向下一个文本框,不要javaScript的!我用JBuilder做的!急用!
- 请问java.net.SocketException: Default SSL context init failed:是什么错误
- 招聘JAVA开发、数据库开发和测试工程师
- java实现图片格式转换的问题
- 怎么样设置环境变量(SET CLASSPATH)
- 菜鸟请教jdk问题!!!!
- 关于字符窜的操作
- 请教一个关于垃圾回收不彻底的问题
- 汉字转换问题~!~
- 如何使JApplet同swing的組件能在browser中使用?
刚才太急了
那个DAY_OF_YEAR
应该是
Calendar.DAY_OF_YEAR
static int AM
Value of the AM_PM field indicating the period of the day from midnight to just before noon.
static int AM_PM
Field number for get and set indicating whether the HOUR is before or after noon.
static int APRIL
Value of the MONTH field indicating the fourth month of the year.
protected boolean areFieldsSet
True if fields[] are in sync with the currently set time.
static int AUGUST
Value of the MONTH field indicating the eighth month of the year.
static int DATE
Field number for get and set indicating the day of the month.
static int DAY_OF_MONTH
Field number for get and set indicating the day of the month.
static int DAY_OF_WEEK
Field number for get and set indicating the day of the week.
static int DAY_OF_WEEK_IN_MONTH
Field number for get and set indicating the ordinal number of the day of the week within the current month.
static int DAY_OF_YEAR
Field number for get and set indicating the day number within the current year.
static int DECEMBER
Value of the MONTH field indicating the twelfth month of the year.
static int DST_OFFSET
Field number for get and set indicating the daylight savings offset in milliseconds.
static int ERA
Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar.
static int FEBRUARY
Value of the MONTH field indicating the second month of the year.
static int FIELD_COUNT
The number of distinct fields recognized by get and set.
protected int[] fields
The field values for the currently set time for this calendar.
static int FRIDAY
Value of the DAY_OF_WEEK field indicating Friday.
static int HOUR
Field number for get and set indicating the hour of the morning or afternoon.
static int HOUR_OF_DAY
Field number for get and set indicating the hour of the day.
protected boolean[] isSet
The flags which tell if a specified time field for the calendar is set.
protected boolean isTimeSet
True if then the value of time is valid.
static int JANUARY
Value of the MONTH field indicating the first month of the year.
static int JULY
Value of the MONTH field indicating the seventh month of the year.
static int JUNE
Value of the MONTH field indicating the sixth month of the year.
static int MARCH
Value of the MONTH field indicating the third month of the year.
static int MAY
Value of the MONTH field indicating the fifth month of the year.
static int MILLISECOND
Field number for get and set indicating the millisecond within the second.
static int MINUTE
Field number for get and set indicating the minute within the hour.
static int MONDAY
Value of the DAY_OF_WEEK field indicating Monday.
static int MONTH
Field number for get and set indicating the month.
static int NOVEMBER
Value of the MONTH field indicating the eleventh month of the year.
static int OCTOBER
Value of the MONTH field indicating the tenth month of the year.
static int PM
Value of the AM_PM field indicating the period of the day from noon to just before midnight.
static int SATURDAY
Value of the DAY_OF_WEEK field indicating Saturday.
static int SECOND
Field number for get and set indicating the second within the minute.
static int SEPTEMBER
Value of the MONTH field indicating the ninth month of the year.
static int SUNDAY
Value of the DAY_OF_WEEK field indicating Sunday.
static int THURSDAY
Value of the DAY_OF_WEEK field indicating Thursday.
protected long time
The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
static int TUESDAY
Value of the DAY_OF_WEEK field indicating Tuesday.
static int UNDECIMBER
Value of the MONTH field indicating the thirteenth month of the year.
static int WEDNESDAY
Value of the DAY_OF_WEEK field indicating Wednesday.
static int WEEK_OF_MONTH
Field number for get and set indicating the week number within the current month.
static int WEEK_OF_YEAR
Field number for get and set indicating the week number within the current year.
static int YEAR
Field number for get and set indicating the year.
static int ZONE_OFFSET
Field number for get and set indicating the raw offs