#include #include #include "date.h" using namespace std; int main() { const date today; const date christmas {12, 25, 2026}; // operator cout << "Today is " << today << ".\n"; // operator+ cout << "One week from today: " << (today + 7) << ".\n"; // operator+= date d = today; cout << "After +=7: " << (d += 7) << ".\n"; // operator++ postfix and prefix date d2 = today; cout << "Postfix ++: " << d2++ << ".\n"; cout << "Prefix ++: " << ++d2 << ".\n"; // operator-- postfix and prefix cout << "Postfix --: " << d2-- << ".\n"; cout << "Prefix --: " << --d2 << ".\n"; // operator== and operator!= cout << "Is today Christmas? " << (today == christmas ? "Yes.\n" : "No.\n"); cout << "Are they different? " << (today != christmas ? "Yes.\n" : "No.\n"); // operator < if (today < christmas) { cout << "Christmas 2026 has not happened yet.\n"; } // operator>> date d3; cout << "Please input a date in the format mm/dd/yyyy.\n"; cin >> d3; if (!cin) cout << "Invalid date entered.\n"; else cout << "You entered: " << d3 << ".\n"; return EXIT_SUCCESS; }