File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Calculate 30 days minus Today's Date?

 
James Dekker
Ranch Hand
Posts: 221
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am trying to figure out how to create a mechanism which will:

1. Compute today's date.

2. Minus it by 30 days (based on a String const that is placed in an inner class)?

Here's my constant:



Here's my calling code:



Am confused as my requirement is to use a constant parameter which is String?

Thank you for taking the time to read this...
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am confused as my requirement is to use a constant parameter which is String?

You will need to construct(hint) an Integer(hint) from the string constant, so you can use it in the add method
 
Divya Janyavula
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[mg]edited out solution
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Divya,
Welcome to the Ranch. I had to edit out your post because
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.

 
Divya Janyavula
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was not aware. Thanks for that
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic