NextDate
Public Member Functions | List of all members
NextDate Class Reference

A class to calculate the next date given a current date. More...

#include <NextDate.h>

Public Member Functions

 NextDate ()
 Default constructor for NextDate. More...
 
std::string getNextDate (int month, int day, int year)
 Calculates the next date given the current date. More...
 

Detailed Description

A class to calculate the next date given a current date.

This class provides functionality to determine the date immediately following a given input date, taking into account month and year boundaries, as well as leap years.

Constructor & Destructor Documentation

◆ NextDate()

NextDate::NextDate ( )

Default constructor for NextDate.

Default constructor for the NextDate class.

Member Function Documentation

◆ getNextDate()

std::string NextDate::getNextDate ( int  month,
int  day,
int  year 
)

Calculates the next date given the current date.

Parameters
monthThe current month (1-12)
dayThe current day (1-31)
yearThe current year (1812-2012)
Returns
A string representation of the next date or an error message

Calculates the next date based on the given month, day, and year.

Parameters
monthThe current month (1-12).
dayThe current day (1-31).
yearThe current year (1812-2012).
Returns
The next date in the format "month/day/year".

The documentation for this class was generated from the following files: