Java Doc for GregorianCalendar.java in  » Apache-Harmony-Java-SE » java-package » java » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Calendar
      java.util.GregorianCalendar

GregorianCalendar
public class GregorianCalendar extends Calendar (Code)
GregorianCalendar provides the conversion between Dates and integer calendar fields, such as the month, year or minute, for the Gregorian calendar. See Calendar for the defined fields.
See Also:   Calendar
See Also:   TimeZone
See Also:   SimpleTimeZone


Field Summary
final public static  intAD
     Value for the AD era.
final public static  intBC
     Value for the BC era.
static  byte[]DaysInMonth
    

Constructor Summary
public  GregorianCalendar()
     Constructs a new GregorianCalendar initialized to the current date and time.
public  GregorianCalendar(int year, int month, int day)
     Constructs a new GregorianCalendar initialized to midnight in the default time zone on the specified date.
public  GregorianCalendar(int year, int month, int day, int hour, int minute)
     Constructs a new GregorianCalendar initialized to the specified date and time.
public  GregorianCalendar(int year, int month, int day, int hour, int minute, int second)
     Constructs a new GregorianCalendar initialized to the specified date and time.
 GregorianCalendar(long milliseconds)
    
public  GregorianCalendar(Locale locale)
     Constructs a new GregorianCalendar initialized to the current date and time and using the specified Locale.
public  GregorianCalendar(TimeZone timezone)
     Constructs a new GregorianCalendar initialized to the current date and time and using the specified TimeZone.
public  GregorianCalendar(TimeZone timezone, Locale locale)
     Constructs a new GregorianCalendar initialized to the current date and time and using the specified TimeZone and Locale.
 GregorianCalendar(boolean ignored)
    

Method Summary
public  voidadd(int field, int value)
     Adds the specified amount to a Calendar field.
public  Objectclone()
     Creates new instance of GregorianCalendar with the same properties.
protected  voidcomputeFields()
     Computes the Calendar fields from the time.
protected  voidcomputeTime()
     Computes the time from the Calendar fields.
public  booleanequals(Object object)
     Compares the specified object to this GregorianCalendar and answer if they are equal.
public  intgetActualMaximum(int field)
     Gets the maximum value of the specified field for the current date.
public  intgetActualMinimum(int field)
     Gets the minimum value of the specified field for the current date.
public  intgetGreatestMinimum(int field)
     Gets the greatest minimum value of the specified field.
final public  DategetGregorianChange()
     Answers the gregorian change date of this calendar.
public  intgetLeastMaximum(int field)
     Gets the smallest maximum value of the specified field.
public  intgetMaximum(int field)
     Gets the greatest maximum value of the specified field.
public  intgetMinimum(int field)
     Gets the smallest minimum value of the specified field.
 intgetOffset(long localTime)
    
public  inthashCode()
     Answers an integer hash code for the receiver.
public  booleanisLeapYear(int year)
     Answers if the specified year is a leap year.
public  voidroll(int field, int value)
     Adds the specified amount the specified field and wrap the value of the field when it goes beyond the maximum or minimum value for the current date.
public  voidroll(int field, boolean increment)
     Increment or decrement the specified field and wrap the value of the field when it goes beyond the maximum or minimum value for the current date.
public  voidsetFirstDayOfWeek(int value)
    
public  voidsetGregorianChange(Date date)
     Sets the gregorian change date of this calendar.
public  voidsetMinimalDaysInFirstWeek(int value)
    

Field Detail
AD
final public static int AD(Code)
Value for the AD era.



BC
final public static int BC(Code)
Value for the BC era.



DaysInMonth
static byte[] DaysInMonth(Code)




Constructor Detail
GregorianCalendar
public GregorianCalendar()(Code)
Constructs a new GregorianCalendar initialized to the current date and time.



GregorianCalendar
public GregorianCalendar(int year, int month, int day)(Code)
Constructs a new GregorianCalendar initialized to midnight in the default time zone on the specified date.
Parameters:
  year - the year
Parameters:
  month - the month
Parameters:
  day - the day of the month



GregorianCalendar
public GregorianCalendar(int year, int month, int day, int hour, int minute)(Code)
Constructs a new GregorianCalendar initialized to the specified date and time.
Parameters:
  year - the year
Parameters:
  month - the month
Parameters:
  day - the day of the month
Parameters:
  hour - the hour
Parameters:
  minute - the minute



GregorianCalendar
public GregorianCalendar(int year, int month, int day, int hour, int minute, int second)(Code)
Constructs a new GregorianCalendar initialized to the specified date and time.
Parameters:
  year - the year
Parameters:
  month - the month
Parameters:
  day - the day of the month
Parameters:
  hour - the hour
Parameters:
  minute - the minute
Parameters:
  second - the second



GregorianCalendar
GregorianCalendar(long milliseconds)(Code)



GregorianCalendar
public GregorianCalendar(Locale locale)(Code)
Constructs a new GregorianCalendar initialized to the current date and time and using the specified Locale.
Parameters:
  locale - the Locale



GregorianCalendar
public GregorianCalendar(TimeZone timezone)(Code)
Constructs a new GregorianCalendar initialized to the current date and time and using the specified TimeZone.
Parameters:
  timezone - the TimeZone



GregorianCalendar
public GregorianCalendar(TimeZone timezone, Locale locale)(Code)
Constructs a new GregorianCalendar initialized to the current date and time and using the specified TimeZone and Locale.
Parameters:
  timezone - the TimeZone
Parameters:
  locale - the Locale



GregorianCalendar
GregorianCalendar(boolean ignored)(Code)




Method Detail
add
public void add(int field, int value)(Code)
Adds the specified amount to a Calendar field.
Parameters:
  field - the Calendar field to modify
Parameters:
  value - the amount to add to the field
exception:
  IllegalArgumentException - when the specified field is DST_OFFSET or ZONE_OFFSET.



clone
public Object clone()(Code)
Creates new instance of GregorianCalendar with the same properties. a shallow copy of this GregorianCalendar



computeFields
protected void computeFields()(Code)
Computes the Calendar fields from the time.



computeTime
protected void computeTime()(Code)
Computes the time from the Calendar fields.
exception:
  IllegalArgumentException - when the time cannot be computed from the current fieldvalues



equals
public boolean equals(Object object)(Code)
Compares the specified object to this GregorianCalendar and answer if they are equal. The object must be an instance of GregorianCalendar and have the same properties.
Parameters:
  object - the object to compare with this object true if the specified object is equal to this GregorianCalendar,false otherwise
exception:
  IllegalArgumentException - when the time is not set and the time cannot be computedfrom the current field values
See Also:   GregorianCalendar.hashCode



getActualMaximum
public int getActualMaximum(int field)(Code)
Gets the maximum value of the specified field for the current date. For example, the maximum number of days in the current month.
Parameters:
  field - the field the maximum value of the specified field



getActualMinimum
public int getActualMinimum(int field)(Code)
Gets the minimum value of the specified field for the current date. For the gregorian calendar, this value is the same as getMinimum().
Parameters:
  field - the field the minimum value of the specified field



getGreatestMinimum
public int getGreatestMinimum(int field)(Code)
Gets the greatest minimum value of the specified field. For the gregorian calendar, this value is the same as getMinimum().
Parameters:
  field - the field the greatest minimum value of the specified field



getGregorianChange
final public Date getGregorianChange()(Code)
Answers the gregorian change date of this calendar. This is the date on which the gregorian calendar came into effect. a Date which represents the gregorian change date



getLeastMaximum
public int getLeastMaximum(int field)(Code)
Gets the smallest maximum value of the specified field. For example, 28 for the day of month field.
Parameters:
  field - the field the smallest maximum value of the specified field



getMaximum
public int getMaximum(int field)(Code)
Gets the greatest maximum value of the specified field. For example, 31 for the day of month field.
Parameters:
  field - the field the greatest maximum value of the specified field



getMinimum
public int getMinimum(int field)(Code)
Gets the smallest minimum value of the specified field.
Parameters:
  field - the field the smallest minimum value of the specified field



getOffset
int getOffset(long localTime)(Code)



hashCode
public int hashCode()(Code)
Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method. the receiver's hash
See Also:   GregorianCalendar.equals



isLeapYear
public boolean isLeapYear(int year)(Code)
Answers if the specified year is a leap year.
Parameters:
  year - the year true if the specified year is a leap year, false otherwise



roll
public void roll(int field, int value)(Code)
Adds the specified amount the specified field and wrap the value of the field when it goes beyond the maximum or minimum value for the current date. Other fields will be adjusted as required to maintain a consistent date.
Parameters:
  field - the field to roll
Parameters:
  value - the amount to add
exception:
  IllegalArgumentException - when an invalid field is specified



roll
public void roll(int field, boolean increment)(Code)
Increment or decrement the specified field and wrap the value of the field when it goes beyond the maximum or minimum value for the current date. Other fields will be adjusted as required to maintain a consistent date. For example, March 31 will roll to April 30 when rolling the month field.
Parameters:
  field - the field to roll
Parameters:
  increment - true to increment the field, false to decrement
exception:
  IllegalArgumentException - when an invalid field is specified



setFirstDayOfWeek
public void setFirstDayOfWeek(int value)(Code)



setGregorianChange
public void setGregorianChange(Date date)(Code)
Sets the gregorian change date of this calendar.
Parameters:
  date - a Date which represents the gregorian change date



setMinimalDaysInFirstWeek
public void setMinimalDaysInFirstWeek(int value)(Code)



Fields inherited from java.util.Calendar
final public static int ERAYEARMONTHWEEK_OF_YEARWEEK_OF_MONTHDATEDAY_OF_MONTHDAY_OF_YEARDAY_OF_WEEKDAY_OF_WEEK_IN_MONTHAM_PMHOURHOUR_OF_DAYMINUTESECONDMILLISECONDZONE_OFFSETDST_OFFSETFIELD_COUNTAMPM(Code)(Java Doc)
final public static int JANUARYFEBRUARYMARCHAPRILMAYJUNEJULYAUGUSTSEPTEMBEROCTOBERNOVEMBERDECEMBERUNDECIMBERSUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY(Code)(Java Doc)
protected boolean areFieldsSet(Code)(Java Doc)
protected int[] fields(Code)(Java Doc)
protected boolean[] isSet(Code)(Java Doc)
protected boolean isTimeSet(Code)(Java Doc)
transient int lastDateFieldSet(Code)(Java Doc)
transient int lastTimeFieldSet(Code)(Java Doc)
protected long time(Code)(Java Doc)

Methods inherited from java.util.Calendar
abstract public void add(int field, int value)(Code)(Java Doc)
public boolean after(Object calendar)(Code)(Java Doc)
public boolean before(Object calendar)(Code)(Java Doc)
final public void clear()(Code)(Java Doc)
final public void clear(int field)(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public int compareTo(Calendar anotherCalendar)(Code)(Java Doc)
protected void complete()(Code)(Java Doc)
abstract protected void computeFields()(Code)(Java Doc)
abstract protected void computeTime()(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
public int get(int field)(Code)(Java Doc)
public int getActualMaximum(int field)(Code)(Java Doc)
public int getActualMinimum(int field)(Code)(Java Doc)
public static synchronized Locale[] getAvailableLocales()(Code)(Java Doc)
public int getFirstDayOfWeek()(Code)(Java Doc)
abstract public int getGreatestMinimum(int field)(Code)(Java Doc)
public static synchronized Calendar getInstance()(Code)(Java Doc)
public static synchronized Calendar getInstance(Locale locale)(Code)(Java Doc)
public static synchronized Calendar getInstance(TimeZone timezone)(Code)(Java Doc)
public static synchronized Calendar getInstance(TimeZone timezone, Locale locale)(Code)(Java Doc)
abstract public int getLeastMaximum(int field)(Code)(Java Doc)
abstract public int getMaximum(int field)(Code)(Java Doc)
public int getMinimalDaysInFirstWeek()(Code)(Java Doc)
abstract public int getMinimum(int field)(Code)(Java Doc)
final public Date getTime()(Code)(Java Doc)
public long getTimeInMillis()(Code)(Java Doc)
public TimeZone getTimeZone()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final protected int internalGet(int field)(Code)(Java Doc)
public boolean isLenient()(Code)(Java Doc)
final public boolean isSet(int field)(Code)(Java Doc)
public void roll(int field, int value)(Code)(Java Doc)
abstract public void roll(int field, boolean increment)(Code)(Java Doc)
public void set(int field, int value)(Code)(Java Doc)
final public void set(int year, int month, int day)(Code)(Java Doc)
final public void set(int year, int month, int day, int hourOfDay, int minute)(Code)(Java Doc)
final public void set(int year, int month, int day, int hourOfDay, int minute, int second)(Code)(Java Doc)
public void setFirstDayOfWeek(int value)(Code)(Java Doc)
public void setLenient(boolean value)(Code)(Java Doc)
public void setMinimalDaysInFirstWeek(int value)(Code)(Java Doc)
final public void setTime(Date date)(Code)(Java Doc)
public void setTimeInMillis(long milliseconds)(Code)(Java Doc)
public void setTimeZone(TimeZone timezone)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.