
#ifndef Date_
#define Date_

//  Author:   Chuck Stewart
//  Purpose:  A class to represent a date - month and day - in a year.
//          It can be constructed from a month and day, a Julian day,
//          or from an existing Date.  Operations include conversion
//          to a Julian day, and addition, comparison and output.


#ifdef GNU
#define std
#include <ostream.h>
#else
#include <ostream>
#endif

const int MaxDays=365;

class Date {
public:
  Date() {}   // default constructor does nothing
  Date( int month, int day );
  Date( int julian_day );
  Date( const Date& prev_date );
  ~Date();
  int JulianDay() const;
  friend Date operator+ ( const Date& date, int ndays );
  friend Date operator+ ( int ndays, const Date& date );
  friend bool operator< ( const Date& left, const Date& right );
  friend bool operator> ( const Date& left, const Date& right );
  friend std::ostream& operator<< ( std::ostream& ostr, const Date& date );

protected:
  int month_;
  int day_;
};

#endif  
  
  
  






