Subtracting days in a Calendar object

Posted by Milli on Stack Overflow See other posts from Stack Overflow or by Milli
Published on 2010-04-12T16:26:18Z Indexed on 2010/04/12 16:32 UTC
Read the original article Hit count: 350

Filed under:
|
|

I need to minus 365 days in a given date (givenDate)-

Calendar calendar = Calendar.getInstance();
calendar.setTime(givenDate);
calendar.add(Calendar.DATE, -365);  

Am I right?

© Stack Overflow or respective owner

Related posts about java

Related posts about calendar