From 791d64c560d5c67964e3d69706ac684528430340 Mon Sep 17 00:00:00 2001 From: pi5fnqcfr <824659727@qq.com> Date: Tue, 4 Jun 2024 22:01:30 +0800 Subject: [PATCH] ADD file via upload --- Date.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Date.cpp diff --git a/Date.cpp b/Date.cpp new file mode 100644 index 0000000..19f3cc4 --- /dev/null +++ b/Date.cpp @@ -0,0 +1,13 @@ +#include "Date.h" + +Date::Date(int year, int month, int day) +{ + this->year = year; + this->month = month; + this->day = day; +} + +string Date::ShowDate() +{ + return to_string(this->year) + "-" + to_string(this->month) + "-" + to_string(this->day); +}