O_Egor

date.h

Oct 15th, 2022
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <exception>
  4. #include <string>
  5. #include <iomanip>
  6. #include <sstream>
  7.  
  8. using namespace std;
  9.  
  10. class Date
  11. {
  12. public:
  13.     Date();
  14.  
  15.     Date(int year, int month, int day);
  16.  
  17.     string DateToStr() const;
  18.  
  19.     int getYear() const;
  20.  
  21.     int getMonth() const;
  22.  
  23.     int getDay() const;
  24.  
  25. private:
  26.     int _Year, _Month, _Day;
  27. };
  28.  
  29. Date ParseDate(istream& is);
  30.  
  31. ostream& operator<<(ostream& os, const Date& _Date);
  32.  
  33. ostream& operator<<(ostream& os, const pair <Date, string>& _Pair);
  34.  
  35. bool operator<(const Date& _Left, const Date& _Right);
  36.  
  37. bool operator<=(const Date& _Left, const Date& _Right);
  38.  
  39. bool operator>(const Date& _Left, const Date& _Right);
  40.  
  41. bool operator>=(const Date& _Left, const Date& _Right);
  42.  
  43. bool operator==(const Date& _Left, const Date& _Right);
  44.  
  45. bool operator!=(const Date& _Left, const Date& _Right);
Advertisement
Add Comment
Please, Sign In to add comment