Argentum_02

date.h

Apr 9th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.01 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3. #include "iostream"
  4. #include "iomanip"
  5. #include <exception>
  6. #include "algorithm"
  7. #include "map"
  8. #include <vector>
  9.  
  10. using namespace std;
  11.  
  12. class Date{
  13. public:
  14.     Date();
  15.     Date(const int &y,const int &m,const int &d);
  16.     void printDate() const;
  17.     int getYear() const;
  18.     int getMonth() const;
  19.     int getDay() const;
  20.     string getDate() const;
  21.     int year;
  22.     int month;
  23.     int day;
  24.     string sdate;
  25.  
  26. };
  27.  
  28. bool checkFormat(std::string str);
  29.  
  30. //Date ParseDate(std::istringstream &sstr);
  31.  
  32. Date ParseDate(istringstream& date_stream);
  33.  
  34. Date ParseDate(istream &sstr);
  35.  
  36. const bool operator < (const Date &arg1,const Date &arg2);
  37.  
  38. const bool operator > (const Date &arg1,const Date &arg2);
  39.  
  40. const bool operator <= (const Date &arg1,const Date &arg2);
  41.  
  42. const bool operator >= (const Date &arg1,const Date &arg2);
  43.  
  44. const bool operator == (const Date &arg1,const Date &arg2);
  45.  
  46. const bool operator != (const Date &arg1,const Date &arg2);
  47.  
  48. ostream &operator <<(ostream &ostr,const Date &dt);
Advertisement
Add Comment
Please, Sign In to add comment