Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 06-12-06, 03:41 PM   #1 (permalink)
Member
 
Join Date: Feb 2006
Location: India
Posts: 89
Thanks: 0
Thanked 1 Times in 1 Posts
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 3 qaisar has disabled reputation
calendar problem

hi friend

i want to have two calendar in the same problem,i want to perform different action on both the calendar,and it should't affect each other.
i am trying to use folllowing code
Calendar calendar = new GregorianCalendar();
Calendar calendar1 = new GregorianCalendar();

to create two calendar,and i am performing different action but its effecting
each other,how to avoid it

please reply
qaisar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-06, 12:09 PM   #2 (permalink)
Member
 
Join Date: Nov 2006
Posts: 56
Thanks: 13
Thanked 3 Times in 3 Posts
Thanks: 13
Thanked 3 Times in 3 Posts
Rep Power: 3 Shiva Shankar is on a distinguished road
Re: calendar problem

Hi
Could you please paste the code, where the references are exactly affecting each other, so that it gets easy to find a solution ?
Shiva Shankar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-06, 05:40 PM   #3 (permalink)
Member
 
Join Date: Nov 2006
Posts: 56
Thanks: 13
Thanked 3 Times in 3 Posts
Thanks: 13
Thanked 3 Times in 3 Posts
Rep Power: 3 Shiva Shankar is on a distinguished road
Re: calendar problem

I made this test and the instances seems to work independently...
code:
--------------------------------------------------------------------------------
public class CalendarTest { public static void main(String[] args) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); Calendar cal1 = new GregorianCalendar(2005, 01, 01); Calendar cal2 = new GregorianCalendar(2006, 01, 01); System.out.println("sdf.format(cal1.getTime()): " + sdf.format(cal1.getTime())); System.out.println("sdf.format(cal2.getTime()): " + sdf.format(cal2.getTime())); cal1.add(Calendar.MONTH, 2); System.out.println("After add 2 months to cal1"); System.out.println("sdf.format(cal1.getTime()): " + sdf.format(cal1.getTime())); System.out.println("sdf.format(cal2.getTime()): " + sdf.format(cal2.getTime())); }}
--------------------------------------------------------------------------------
Shiva Shankar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
calendar problem qaisar JAVA Technologies 5 01-12-06 04:55 PM
problem with textbox in ms.net2005(very urgent) bandiprasad VB / ASP.NET Technologies 3 22-11-06 07:50 PM
Simple solution to a complex problem AjayKumar.Kataram Inspire yourself & Others - Leaders Zone 3 10-10-06 12:30 PM
System Problem au123 NETWORK ADMINISTRATION , HARDWARE & TROUBLESHOOTING 4 09-10-06 10:59 PM
Google Calendar ! BINNY Latest Tech News & Innovations 3 27-04-06 01:27 AM


All times are GMT +6.5. The time now is 03:07 PM.





Search Engine Optimization by vBSEO 3.1.0