Beruflich Dokumente
Kultur Dokumente
default locale.
GregorianCalendar(int year, int month, int date) constructs a Gregorian calendar with the given date.
Parameters: year
month date
the year of the date the month of the date. This value is 0-based; for example, 0 for January the day of the month
GregorianCalendar(int year, int month, int date, int hour, int minutes, int seconds) constructs a Gregorian calendar with the given date and time.
Parameters: year
month date hour minutes seconds
the year of the date the month of the date. This value is 0-based; for example, 0 for January the day of the month the hour (between 0 and 23) the minutes (between 0 and 59) the seconds (between 0 and 59)
boolean equals(Object when) compares this calendar object with when and returns true if the objects represent the same point in time.
boolean before(Object when) compares this calendar object with when and returns true if it comes before when.
boolean after(Object when) compares this calendar object with when and returns true if it comes after when.
Calendar.MONTH, Calendar.WEEK_OF_YEAR, Calendar.WEEK_OF_MONTH, Calendar.DAY_OF_MONTH, Calendar.DAY_OF_YEAR, Calendar.DAY_OF_WEEK, Calendar.DAY_OF_WEEK_IN_MONTH, Calendar.AM_PM, Calendar.HOUR, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND, Calendar.ZONE_OFFSET, Calendar.DST_OFFSET
void set(int field, int value) sets the value of a particular field.
Parameters:
field value
void set(int year, int month, int day) sets the date fields to a new date.
Parameters: year
month day
the year of the date the month of the date. This value is 0-based; for example, 0 for January the day of the month
void set(int year, int month, int day, int hour, int minutes, int seconds) sets the date and time fields to new values.
Parameters: year
month day hour minutes seconds
the year of the date the month of the date. This value is 0-based; for example, 0 for January the day of the month the hour (between 0 and 23) the minutes (between 0 and 59) the seconds (between 0 and 59)
is a date arithmetic method. Adds the specified amount of time to the given time field. For example, to add 7 days to the current calendar date, call c.add(Calendar.DAY_OF_MONTH, 7).
Parameters: field
amount
the field to modify (using one of the constants documented in the get method) the amount by which the field should be changed (can be negative)
void setTime(Date time) sets this calendar to the given point in time.
Parameters:
Date getTime()
Time
a point in time
gets the point in time that is represented by the current value of this calendar object.