Re: Calendar Issue



Hi Guys ,

What i Did is ,

//Method To Get Today Calendar
public static Calendar getCalendar(Calendar calendar) {

Calendar todaycalendar=(Calendar)calendar;
todaycalendar.set(Calendar.DATE,todaycalendar.getTime().getDate());
todaycalendar.set(Calendar.AM_PM,Calendar.PM);
todaycalendar.set(Calendar.HOUR,00);
todaycalendar.set(Calendar.MINUTE,00);
todaycalendar.set(Calendar.SECOND,00);
return todaycalendar;
}

when calling this method ,

Calendar todayCalendar = HelperClass.getCalendar(Calendar.getInstance
());


so that i would use only one Calendar instance. at least i can cut one
more instance.

thank u.
suugest me if we modify this any more
.