I am working on a Java application which generates a report for a duration entered by a user in the command line. The user needs to enter the dates in the following format: dd-MM-yyyy
> java report startDate endDate
Example:
java report 01-01-2013 31-03-2013
In the code I save the dates in two strings. I have to make sure that the start date entered by the user should be a date earlier than the end-date. Is there an built-in function which can help me achieve this by passing these two strings to it?