#include #include #include "Valentine.h" using namespace std; // Constructor for Valentine's Day Valentine::Valentine() { month = 2; day = 14; year = 2026; } // This is to know the current date void Valentine::checkDay() { time_t now = time(0); tm *ltm = localtime(&now); int currentMonth = 1 + ltm->tm_mon; // where the month starts int currentDay = ltm->tm_mday; int currentYear = 1900 + ltm->tm_year; if(currentMonth == month && currentDay == day && currentYear == year) { cout << "Today is Valentine's Day! HOORAY!!" << endl; } else { //The Calculation int daysLeft = day - currentDay; cout << "Today is not Valentine's Day ;-(." << endl; if(daysLeft > 0 && currentMonth == month) cout << daysLeft << " days left until Valentine's Day." << endl; else if(currentMonth < month) cout << "Valentine's Day is coming soon!!!" << endl; else cout << "Valentine's Day has already passed. :(" << endl; } }