In this program, you will develop a calendar application. Implement the following functionality:
1. Calculate difference between two dates - Take user input for both dates & calculate difference between them in months & days as well as weeks & days. For example, if the user enters x & y, display difference as: 39 months, 3 days, OR 78 weeks, 3 days
2. Calculate a future date - Take user input for start date & for number of weeks, months or days to add to it. The user can type “3 months”, “43 weeks” etc. & the program should interpret the text input correctly & add appropriate number of days to the start date. Display output in the form:
<user input> from the start date <user input> is <day of the week>, <day> <month>
<year>.
Use overloading of subtraction operator to implement data difference. Implement above member functions in at least a Date & Calendar class. The program should keep displaying options until user chooses to exit.
Comments
Leave a comment