Calendar month + something -- imp urgent
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   megala_raghavan
Posted On:   Sunday, January 27, 2002 06:47 PM

i want to display the month + 5 of the every calendar (ie from today i would like to get 5 months added) , how can i go for it,
examples are helpful thanks in advance.

Re: Calendar month + something -- imp urgent

Posted By:   Chinmay_Bajikar  
Posted On:   Monday, January 28, 2002 10:32 PM

Try the java.util.GregorianCalendar class.

It allows u to extract the month, day, year and other things

from the actual Date.



Also it has the setLeniant() method which allows u to check/uncheck if the Date is a valid date or not.

Some of the calsses constructors are,


GregorianCalendar()

Constructs a default GregorianCalendar using the current time

in the default time zone with the default locale.


GregorianCalendar(int year, int month, int date)

Constructs a GregorianCalendar with the given date set in the

default time zone with the default locale.


See the documentation for more info.

And let me know if it helped u.


Thanks and Best of luck,

Chinmay.
About | Sitemap | Contact