#ifndef DATE_H
#define DATE_H

#include<iostream>
#include<string>
#include<vector>

using namespace std;

class Date {


friend bool leapYear(int);//Function defined outside the class (not a member) but able to access the private members.

private:

	int month;
	int day;
	int year;
	bool invalidDay();
	bool invalidMonth();
	bool invalidYear();
	void setMonth(int);
	void setDay(int);
	void setYear(int);
	vector<int> daysInMonth;
	
	


public:

	Date(int m=1,int d=1,int y=1900);//Constructor 1
	Date(string); //Constructor 2
	Date(const Date &);//Constructor 3

	
	void checkDate(); //Check if input is valid e.g. 1<=months<=12

	
	
	int getMonth()const;
	int getDay()const;
	int getYear()const;

	void printDate()const; //Print date in the format m/d/yyyyy
	void printVerbose()const;//Print date in format: Name of day,  day name of month, year
	int dayOfTheYear() const; //number of days in year up to Date
	int daysSinceStart()const;//days from 1/1/1900 to Date
	string dayOfTheWeek()const;//name of day of the week
	string nameOfMonth()const;//name of the month
	

	Date operator ++();
	Date operator --();
	Date operator ++(int);
	Date operator --(int);
	Date nextBusDay();
	Date operator+=(int);
	Date operator-=(int);
	~Date();//destructor

};
bool leapYear(int); //Checks if a given year is a leap year
Date daysOfYearToDate(int,int); //Converts the number of days of the year to Date
Date daysToDate(int);//Converts the number of days since 1/1/1900 to Date

bool operator == (const Date&,const Date&);
bool operator != (const Date&, const Date &);
bool operator < (const Date &,const Date&);
bool operator <= (const Date&, const Date&);
bool operator >= (const Date&, const Date&);

Date operator+(const Date &,const int&);
Date operator-(const Date &,const int&);

#endif
