... is it possible to do this without using that class?
Yes, in fact you can code it in binary machine code if you want. But why? Someone has gone to a great deal of trouble to write and test a class that does exactly what you want - why re-invent the wheel?
IMHO a good Java programmer isn't just soneone who knows the language, it'ssomeone who knows and uses the API.
You can get a Calendar instance set to the current date/time with
public static Calendar getInstance()
You can compare two instances with
public int compareTo(Calendar anotherCalendar)
nb: most of the methods you need are defined in the Calendar abstract superclass, not in GregorianCalendar
for example, if i enter 1-22-1991, this returns 18.
if i enter 9-23-1991, this returns 17.
BUT if i enter 8-10-1991, this returns 17!
ALSO if i enter 8-9-1991, this returns 17!
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.