commit 8218957b021792c4c516a22fff2b7c19cb1649d4 Author: Lenyiin <569963146@qq.com> Date: Wed Sep 4 20:08:52 2024 +0800 博客 https://blog.lenyiin.com/cpp-date-class/ 的代码仓库 diff --git a/Linux/Date.cc b/Linux/Date.cc new file mode 100644 index 0000000..2f660e6 --- /dev/null +++ b/Linux/Date.cc @@ -0,0 +1,179 @@ +#include "Date.hpp" +using namespace Lenyiin; + +// 测试构造析构函数 +void TestDate_1() +{ + // 默认无参构造 + Date d1; + // 默认有参构造 + Date d2(2024, 9, 1); + // 拷贝构造 + Date d3(d2); + + // 测试输出功能 + std::cout << "d1 为 " << d1 << std::endl; + std::cout << "d2 为 " << d2 << std::endl; + std::cout << "d3 为 " << d3 << std::endl; + + // 赋值拷贝 + d1 = d3; + std::cout << "d1 为" << d1 << std::endl; + + // 测试闰年闰月 + Date d4(2008, 2, 29); + std::cout << "d4 为" << d4 << std::endl; + + // 测试日期有效性 + Date d5(2007, 2, 29); + std::cout << "d5 为" << d5 << std::endl; +} + +// 测试日期比较 +void TestDate_2() +{ + Date d1(2018, 3, 5); + Date d2(2019, 6, 20); + Date d3(d1); + + // 测试 < + if (d1 < d2) + { + std::cout << d1 << " < " << d2 << std::endl; + } + if (d2 < d1) + { + std::cout << d2 << " < " << d1 << std::endl; + } + + // 测试 == != + if (d1 == d3) + { + std::cout << d1 << " == " << d3 << std::endl; + } + else + { + std::cout << d1 << " != " << d3 << std::endl; + } + if (d1 == d2) + { + std::cout << d1 << " == " << d2 << std::endl; + } + else + { + std::cout << d1 << " != " << d2 << std::endl; + } + + // 测试 <= + if (d1 <= d2) + { + std::cout << d1 << " <= " << d2 << std::endl; + } + if (d2 <= d1) + { + std::cout << d2 << " <= " << d1 << std::endl; + } + + // 测试 > + if (d1 > d2) + { + std::cout << d1 << " > " << d2 << std::endl; + } + if (d2 > d1) + { + std::cout << d2 << " > " << d1 << std::endl; + } + + // 测试 >= + if (d1 >= d2) + { + std::cout << d1 << " >= " << d2 << std::endl; + } + if (d2 >= d1) + { + std::cout << d2 << " >= " << d1 << std::endl; + } +} + +// 测试日期增减 +void TestDate_3() +{ + Date d1(2024, 9, 2); + + // 测试打印函数 + d1.Print(); + + // + + Date d2 = d1 + 100; + // += + d1 += 100; + d1.Print(); + d2.Print(); + + // - + d2 = d1 - 100; + // -= + d1 -= 100; + d1.Print(); + d2.Print(); + + // += 负数 + d2 = d1 + (-100); + d1 += -100; + d1.Print(); + d2.Print(); + + // -= 负数 + d2 = d1 - (-100); + d1 -= -100; + d1.Print(); + d2.Print(); +} + +// 计算日期差 +void TestDate_4() +{ + Date d1(2024, 9, 2); + + // 前置 ++ 后置 ++ + Date d2 = ++d1; + Date d3 = d1++; + d1.Print(); + d2.Print(); + d3.Print(); + + // 前置 -- 后置 -- + d2 = --d1; + d3 = d1--; + d1.Print(); + d2.Print(); + d3.Print(); + + // 日期差值 + Date d4 = d1 + 100; + std::cout << d4 << " - " << d1 << " = " << d4 - d1 << std::endl; + + // 日期修改 + Date d5(2024, 9, 2); + std::cout << "修改前的 d5 为" << d5 << std::endl; + d5[0] = 2066, d5[1] = 6, d5[2] = 6; + std::cout << "修改后的 d5 为" << d5 << std::endl; + + // 测试输入 + Date d6; + std::cin >> d6; + std::cout << "d6 为" << d6 << std::endl; +} + +int main() +{ + // TestDate_1(); + + // TestDate_2(); + + // TestDate_3(); + + TestDate_4(); + + return 0; +} \ No newline at end of file diff --git a/Linux/Date.hpp b/Linux/Date.hpp new file mode 100644 index 0000000..2e2777e --- /dev/null +++ b/Linux/Date.hpp @@ -0,0 +1,301 @@ +#pragma once + +#include + +namespace Lenyiin +{ + class Date + { + private: + friend std::ostream &operator<<(std::ostream &_cout, const Date &d); + friend std::istream &operator>>(std::istream &_cin, Date &d); + + // 判断是否为闰年 + bool isLeapYear(int year) const + { + return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); + } + + // 获取任意月份的天数 + int GetMonthDay(int year, int month) + { + static int monthArray[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + int day = monthArray[month]; + + // 判断是否是闰年闰月 + if (month == 2 && isLeapYear(year)) + { + day = 29; + } + + return day; + } + + // 验证日期的有效性 + bool isValidDate(int year, int month, int day) + { + // 月份必须在 1 到 12 之间 + if (month < 1 || month > 12) + { + return false; + } + + // 日期必须在 1 到 当月最大天数 之间 + return day >= 1 && day <= GetMonthDay(year, month); + } + + public: + // 构造函数 + Date(int year = 2024, int month = 1, int day = 1) + { + if (!isValidDate(year, month, day)) + { + std::cerr << "Invalid date!" << std::endl; + exit(1); // 终止程序, 日期无效 + } + + _year = year; + _month = month; + _day = day; + } + + // 拷贝构造 + Date(const Date &d) + : _year(d._year), _month(d._month), _day(d._day) + { + } + + void Print() + { + std::cout << _year << "-" << _month << "-" << _day << std::endl; + } + + // 赋值运算符重载 + // 运算符重载,是为了让自定义类型可以像内置类型一样去使用运算符 + // 自定义类型传参数和返回值时,在可以的情况下,尽量使用引用,减少拷贝的开销 + // d1.operator==(d2); + bool operator==(const Date &d) const // bool operator==(Date* this, const Date& d) const + { + if (this->_year == d._year && this->_month == d._month && this->_day == d._day) + { + return true; + } + return false; + } + + // d1.operator<(&d2); + bool operator<(const Date &d) const // bool operator<(Date* this, const Date& d) const + { + if (this->_year < d._year) + { + return true; + } + else if (this->_year == d._year && this->_month < d._month) + { + return true; + } + else if (this->_year == d._year && this->_month == d._month && this->_day < d._day) + { + return true; + } + return false; + } + + // d1 <= d2 + // d1.operator<=(&d2); + bool operator<=(const Date &d) const // bool operator<=(Date* this, const Date& d) const + { + return (*this < d) || (*this == d); // 代码复用 + } + + // d1.operator>(d2); + bool operator>(const Date &d) const // bool operator>(Date* this, const Date& d) const + { + return d < *this; // 代码复用 + } + + // d1 >= d2 + // d1.operator>=(&d2); + bool operator>=(const Date &d) const // bool operator>=(Date* this, const Date& d) const + { + return !(*this < d); // 代码复用 + } + + // d1 != d2 + // d1.operator!=(&d2); + bool operator!=(const Date &d) const // bool operator!=(Date* this, const Date& d) const + { + return !(*this == d); // 代码复用 + } + + // d1.operator=(d2); + Date &operator=(const Date &d) // Date& operator=(Date* this, const Date& d) + { + if (*this != d) + { + _year = d._year; + _month = d._month; + _day = d._day; + } + return *this; + } + + // d1.operator+=(int); + Date &operator+=(int day) // Date& operator+=(Date* this, int day) + { + if (day < 0) + { + return *this -= -day; + } + + _day += day; + while (_day > GetMonthDay(_year, _month)) + { + // 如果日期不合法,就要往月进位 + _day -= GetMonthDay(_year, _month); + _month++; + + // 如果月不合法,就要往年进位 + if (_month > 12) + { + _year++; + _month = 1; + } + } + + return *this; + } + + // d1.operator+(int); + Date operator+(int day) // Date operator+(Date* this, int day) + { + Date ret(*this); // Date ret(this->_year, this->_month, this->_day); + return ret += day; + } + + // d1.operator-=(int); + Date &operator-=(int day) // Date& operator-=(Date* this, int day) + { + if (day < 0) + { + return *this += -day; + } + + _day -= day; + while (_day < 1) + { + // 如果日期不合法, 就要往月退位, 月不合法就要往年退位 + _month--; + if (_month == 0) + { + _year--; + _month = 12; + } + _day += GetMonthDay(_year, _month); + } + + return *this; + } + + // d1.operator-(int); + Date operator-(int day) // Date operator-(Date* this, int day) + { + Date ret(*this); + return ret -= day; + } + + // d1.operator++(); // 前置++ + Date &operator++() // Date& operator++(Date* this) + { + *this += 1; + return *this; // 返回加之后的结果 + } + + // d1.operator++(int); // 后置++ + Date operator++(int) // Date operator++(Date* this, int) + { + Date ret(*this); + *this += 1; + return ret; // 返回加之前的结果 + } + + // d1.operator--(); // 前置-- + Date &operator--() // Date& operator--(Date* this) + { + *this -= 1; + return *this; + } + + // d1.operator--(int); // 后置-- + Date operator--(int) // Date operator--(Date* this, int) + { + Date ret(*this); + *this -= 1; + return ret; + } + + // d1.operator-(d2); + int operator-(const Date &d) // int operator-(Date* this, const Date& d) + { + Date max = *this; + Date min = d; + int flag = 1; + + if (*this < d) + { + max = d; + min = *this; + flag = -1; + } + + int count = 0; + while (min != max) + { + ++min; + count++; + } + + return count * flag; + } + + // d1.operator[](int); + int &operator[](int index) // int& operator[](Date* this, int index) + { + if (index == 0) + { + return _year; + } + else if (index == 1) + { + return _month; + } + else if (index == 2) + { + return _day; + } + } + + // 析构函数 + ~Date() + { + std::cout << "~Date()" << std::endl; + } + + private: + int _year; + int _month; + int _day; + }; + + std::ostream &operator<<(std::ostream &_cout, const Date &d) + { + _cout << d._year << "-" << d._month << "-" << d._day; + return _cout; + } + + std::istream &operator>>(std::istream &_cin, Date &d) + { + _cin >> d._year >> d._month >> d._day; + return _cin; + } +} \ No newline at end of file diff --git a/Linux/Makefile b/Linux/Makefile new file mode 100644 index 0000000..74fcd5e --- /dev/null +++ b/Linux/Makefile @@ -0,0 +1,5 @@ +date:Date.cc + g++ -o $@ $^ +.PHONY:clean +clean: + rm -f date \ No newline at end of file diff --git a/Linux/date b/Linux/date new file mode 100644 index 0000000..8f73a79 Binary files /dev/null and b/Linux/date differ diff --git a/Windows_Date/.vs/Windows_Date/FileContentIndex/1d7104f5-2bb1-4590-ba21-1b8bca3459dc.vsidx b/Windows_Date/.vs/Windows_Date/FileContentIndex/1d7104f5-2bb1-4590-ba21-1b8bca3459dc.vsidx new file mode 100644 index 0000000..598ccfe Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/FileContentIndex/1d7104f5-2bb1-4590-ba21-1b8bca3459dc.vsidx differ diff --git a/Windows_Date/.vs/Windows_Date/FileContentIndex/ce8044cb-eadc-426a-bce0-7f22060d38ec.vsidx b/Windows_Date/.vs/Windows_Date/FileContentIndex/ce8044cb-eadc-426a-bce0-7f22060d38ec.vsidx new file mode 100644 index 0000000..0525946 Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/FileContentIndex/ce8044cb-eadc-426a-bce0-7f22060d38ec.vsidx differ diff --git a/Windows_Date/.vs/Windows_Date/FileContentIndex/ea3decc6-bda7-45d4-8028-d3ca5d94620a.vsidx b/Windows_Date/.vs/Windows_Date/FileContentIndex/ea3decc6-bda7-45d4-8028-d3ca5d94620a.vsidx new file mode 100644 index 0000000..3314f44 Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/FileContentIndex/ea3decc6-bda7-45d4-8028-d3ca5d94620a.vsidx differ diff --git a/Windows_Date/.vs/Windows_Date/v17/.suo b/Windows_Date/.vs/Windows_Date/v17/.suo new file mode 100644 index 0000000..aca7b71 Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/v17/.suo differ diff --git a/Windows_Date/.vs/Windows_Date/v17/Browse.VC.db b/Windows_Date/.vs/Windows_Date/v17/Browse.VC.db new file mode 100644 index 0000000..96c477c Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/v17/Browse.VC.db differ diff --git a/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/3de5b954c8b72439/DATE.ipch b/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/3de5b954c8b72439/DATE.ipch new file mode 100644 index 0000000..b1280fc Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/3de5b954c8b72439/DATE.ipch differ diff --git a/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/e0bcb054948c5300/DATE.ipch b/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/e0bcb054948c5300/DATE.ipch new file mode 100644 index 0000000..dfad0b2 Binary files /dev/null and b/Windows_Date/.vs/Windows_Date/v17/ipch/AutoPCH/e0bcb054948c5300/DATE.ipch differ diff --git a/Windows_Date/Date.cpp b/Windows_Date/Date.cpp new file mode 100644 index 0000000..b39f235 --- /dev/null +++ b/Windows_Date/Date.cpp @@ -0,0 +1,179 @@ +#include "Date.hpp" +using namespace Lenyiin; + +// Թ +void TestDate_1() +{ + // Ĭ޲ι + Date d1; + // Ĭвι + Date d2(2024, 9, 1); + // + Date d3(d2); + + // + std::cout << "d1 Ϊ " << d1 << std::endl; + std::cout << "d2 Ϊ " << d2 << std::endl; + std::cout << "d3 Ϊ " << d3 << std::endl; + + // ֵ + d1 = d3; + std::cout << "d1 Ϊ" << d1 << std::endl; + + // + Date d4(2008, 2, 29); + std::cout << "d4 Ϊ" << d4 << std::endl; + + // Ч + Date d5(2007, 2, 29); + std::cout << "d5 Ϊ" << d5 << std::endl; +} + +// ڱȽ +void TestDate_2() +{ + Date d1(2018, 3, 5); + Date d2(2019, 6, 20); + Date d3(d1); + + // < + if (d1 < d2) + { + std::cout << d1 << " < " << d2 << std::endl; + } + if (d2 < d1) + { + std::cout << d2 << " < " << d1 << std::endl; + } + + // == != + if (d1 == d3) + { + std::cout << d1 << " == " << d3 << std::endl; + } + else + { + std::cout << d1 << " != " << d3 << std::endl; + } + if (d1 == d2) + { + std::cout << d1 << " == " << d2 << std::endl; + } + else + { + std::cout << d1 << " != " << d2 << std::endl; + } + + // <= + if (d1 <= d2) + { + std::cout << d1 << " <= " << d2 << std::endl; + } + if (d2 <= d1) + { + std::cout << d2 << " <= " << d1 << std::endl; + } + + // > + if (d1 > d2) + { + std::cout << d1 << " > " << d2 << std::endl; + } + if (d2 > d1) + { + std::cout << d2 << " > " << d1 << std::endl; + } + + // >= + if (d1 >= d2) + { + std::cout << d1 << " >= " << d2 << std::endl; + } + if (d2 >= d1) + { + std::cout << d2 << " >= " << d1 << std::endl; + } +} + +// +void TestDate_3() +{ + Date d1(2024, 9, 2); + + // Դӡ + d1.Print(); + + // + + Date d2 = d1 + 100; + // += + d1 += 100; + d1.Print(); + d2.Print(); + + // - + d2 = d1 - 100; + // -= + d1 -= 100; + d1.Print(); + d2.Print(); + + // += + d2 = d1 + (-100); + d1 += -100; + d1.Print(); + d2.Print(); + + // -= + d2 = d1 - (-100); + d1 -= -100; + d1.Print(); + d2.Print(); +} + +// ڲ +void TestDate_4() +{ + Date d1(2024, 9, 2); + + // ǰ ++ ++ + Date d2 = ++d1; + Date d3 = d1++; + d1.Print(); + d2.Print(); + d3.Print(); + + // ǰ -- -- + d2 = --d1; + d3 = d1--; + d1.Print(); + d2.Print(); + d3.Print(); + + // ڲֵ + Date d4 = d1 + 100; + std::cout << d4 << " - " << d1 << " = " << d4 - d1 << std::endl; + + // ޸ + Date d5(2024, 9, 2); + std::cout << "޸ǰ d5 Ϊ" << d5 << std::endl; + d5[0] = 2066, d5[1] = 6, d5[2] = 6; + std::cout << "޸ĺ d5 Ϊ" << d5 << std::endl; + + // + Date d6; + std::cin >> d6; + std::cout << "d6 Ϊ" << d6 << std::endl; +} + +int main() +{ + //TestDate_1(); + + //TestDate_2(); + + //TestDate_3(); + + TestDate_4(); + + return 0; +} \ No newline at end of file diff --git a/Windows_Date/Date.hpp b/Windows_Date/Date.hpp new file mode 100644 index 0000000..e500c4e --- /dev/null +++ b/Windows_Date/Date.hpp @@ -0,0 +1,302 @@ +#pragma once + +#include + +namespace Lenyiin +{ + class Date + { + private: + friend std::ostream& operator<<(std::ostream& _cout, const Date& d); + friend std::istream& operator>>(std::istream& _cin, Date& d); + + // жǷΪ + bool isLeapYear(int year) const + { + return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); + } + + // ȡ·ݵ + int GetMonthDay(int year, int month) + { + static int monthArray[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + int day = monthArray[month]; + + // жǷ + if (month == 2 && isLeapYear(year)) + { + day = 29; + } + + return day; + } + + // ֤ڵЧ + bool isValidDate(int year, int month, int day) + { + // ·ݱ 1 12 ֮ + if (month < 1 || month > 12) + { + return false; + } + + // ڱ 1 ֮ + return day >= 1 && day <= GetMonthDay(year, month); + } + + public: + // 캯 + Date(int year = 2024, int month = 1, int day = 1) + { + if (!isValidDate(year, month, day)) + { + std::cerr << "Invalid date!" << std::endl; + exit(1); // ֹ, Ч + } + + _year = year; + _month = month; + _day = day; + } + + // + Date(const Date& d) + : _year(d._year), _month(d._month), _day(d._day) + { + + } + + void Print() + { + std::cout << _year << "-" << _month << "-" << _day << std::endl; + } + + // ֵ + // أΪԶͿһȥʹ + // ԶʹͷֵʱڿԵ£ʹãٿĿ + // d1.operator==(d2); + bool operator==(const Date& d) const // bool operator==(Date* this, const Date& d) const + { + if (this->_year == d._year && this->_month == d._month && this->_day == d._day) + { + return true; + } + return false; + } + + // d1.operator<(&d2); + bool operator<(const Date& d) const // bool operator<(Date* this, const Date& d) const + { + if (this->_year < d._year) + { + return true; + } + else if (this->_year == d._year && this->_month < d._month) + { + return true; + } + else if (this->_year == d._year && this->_month == d._month && this->_day < d._day) + { + return true; + } + return false; + } + + // d1 <= d2 + // d1.operator<=(&d2); + bool operator<=(const Date& d) const // bool operator<=(Date* this, const Date& d) const + { + return (*this < d) || (*this == d); // 븴 + } + + // d1.operator>(d2); + bool operator>(const Date& d) const // bool operator>(Date* this, const Date& d) const + { + return d < *this; // 븴 + } + + // d1 >= d2 + // d1.operator>=(&d2); + bool operator>=(const Date& d) const // bool operator>=(Date* this, const Date& d) const + { + return !(*this < d); // 븴 + } + + // d1 != d2 + // d1.operator!=(&d2); + bool operator!=(const Date& d) const // bool operator!=(Date* this, const Date& d) const + { + return !(*this == d); // 븴 + } + + // d1.operator=(d2); + Date& operator=(const Date& d) // Date& operator=(Date* this, const Date& d) + { + if (*this != d) + { + _year = d._year; + _month = d._month; + _day = d._day; + } + return *this; + } + + // d1.operator+=(int); + Date& operator+=(int day) // Date& operator+=(Date* this, int day) + { + if (day < 0) + { + return *this -= -day; + } + + _day += day; + while (_day > GetMonthDay(_year, _month)) + { + // ڲϷҪ½λ + _day -= GetMonthDay(_year, _month); + _month++; + + // ²ϷҪλ + if (_month > 12) + { + _year++; + _month = 1; + } + } + + return *this; + } + + // d1.operator+(int); + Date operator+(int day) // Date operator+(Date* this, int day) + { + Date ret(*this); // Date ret(this->_year, this->_month, this->_day); + return ret += day; + } + + // d1.operator-=(int); + Date& operator-=(int day) // Date& operator-=(Date* this, int day) + { + if (day < 0) + { + return *this += -day; + } + + _day -= day; + while (_day < 1) + { + // ڲϷ, Ҫλ, ²ϷҪλ + _month--; + if (_month == 0) + { + _year--; + _month = 12; + } + _day += GetMonthDay(_year, _month); + } + + return *this; + } + + // d1.operator-(int); + Date operator-(int day) // Date operator-(Date* this, int day) + { + Date ret(*this); + return ret -= day; + } + + // d1.operator++(); // ǰ++ + Date& operator++() // Date& operator++(Date* this) + { + *this += 1; + return *this; // ؼ֮Ľ + } + + // d1.operator++(int); // ++ + Date operator++(int) // Date operator++(Date* this, int) + { + Date ret(*this); + *this += 1; + return ret; // ؼ֮ǰĽ + } + + // d1.operator--(); // ǰ-- + Date& operator--() // Date& operator--(Date* this) + { + *this -= 1; + return *this; + } + + // d1.operator--(int); // -- + Date operator--(int) // Date operator--(Date* this, int) + { + Date ret(*this); + *this -= 1; + return ret; + } + + // d1.operator-(d2); + int operator-(const Date& d) // int operator-(Date* this, const Date& d) + { + Date max = *this; + Date min = d; + int flag = 1; + + if (*this < d) + { + max = d; + min = *this; + flag = -1; + } + + int count = 0; + while (min != max) + { + ++min; + count++; + } + + return count * flag; + } + + // d1.operator[](int); + int& operator[](int index) // int& operator[](Date* this, int index) + { + if (index == 0) + { + return _year; + } + else if (index == 1) + { + return _month; + } + else if (index == 2) + { + return _day; + } + } + + // + ~Date() + { + std::cout << "~Date()" << std::endl; + } + + private: + int _year; + int _month; + int _day; + }; + + std::ostream& operator<<(std::ostream& _cout, const Date& d) + { + _cout << d._year << "-" << d._month << "-" << d._day; + return _cout; + } + + std::istream& operator>>(std::istream& _cin, Date& d) + { + _cin >> d._year >> d._month >> d._day; + return _cin; + } +} \ No newline at end of file diff --git a/Windows_Date/Windows_Date.sln b/Windows_Date/Windows_Date.sln new file mode 100644 index 0000000..d340c9d --- /dev/null +++ b/Windows_Date/Windows_Date.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34221.43 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Windows_Date", "Windows_Date.vcxproj", "{E23EDFCA-3BC8-4847-9E19-7321D4E46286}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Debug|x64.ActiveCfg = Debug|x64 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Debug|x64.Build.0 = Debug|x64 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Debug|x86.ActiveCfg = Debug|Win32 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Debug|x86.Build.0 = Debug|Win32 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Release|x64.ActiveCfg = Release|x64 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Release|x64.Build.0 = Release|x64 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Release|x86.ActiveCfg = Release|Win32 + {E23EDFCA-3BC8-4847-9E19-7321D4E46286}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CB230911-DB6C-4E35-ABA2-5F9A64C579A4} + EndGlobalSection +EndGlobal diff --git a/Windows_Date/Windows_Date.vcxproj b/Windows_Date/Windows_Date.vcxproj new file mode 100644 index 0000000..a2257b7 --- /dev/null +++ b/Windows_Date/Windows_Date.vcxproj @@ -0,0 +1,138 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {e23edfca-3bc8-4847-9e19-7321d4e46286} + WindowsDate + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/Windows_Date/Windows_Date.vcxproj.filters b/Windows_Date/Windows_Date.vcxproj.filters new file mode 100644 index 0000000..a942e54 --- /dev/null +++ b/Windows_Date/Windows_Date.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 头文件 + + + + + 源文件 + + + \ No newline at end of file diff --git a/Windows_Date/Windows_Date.vcxproj.user b/Windows_Date/Windows_Date.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Windows_Date/Windows_Date.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Windows_Date/x64/Debug/Date.obj b/Windows_Date/x64/Debug/Date.obj new file mode 100644 index 0000000..b0f21f6 Binary files /dev/null and b/Windows_Date/x64/Debug/Date.obj differ diff --git a/Windows_Date/x64/Debug/Windows_Date.exe b/Windows_Date/x64/Debug/Windows_Date.exe new file mode 100644 index 0000000..84222a0 Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.exe differ diff --git a/Windows_Date/x64/Debug/Windows_Date.exe.recipe b/Windows_Date/x64/Debug/Windows_Date.exe.recipe new file mode 100644 index 0000000..07fca62 --- /dev/null +++ b/Windows_Date/x64/Debug/Windows_Date.exe.recipe @@ -0,0 +1,11 @@ + + + + + E:\Git 仓库\公开仓库\1_Date\Windows_Date\x64\Debug\Windows_Date.exe + + + + + + \ No newline at end of file diff --git a/Windows_Date/x64/Debug/Windows_Date.ilk b/Windows_Date/x64/Debug/Windows_Date.ilk new file mode 100644 index 0000000..ced636e Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.ilk differ diff --git a/Windows_Date/x64/Debug/Windows_Date.log b/Windows_Date/x64/Debug/Windows_Date.log new file mode 100644 index 0000000..58fffbd --- /dev/null +++ b/Windows_Date/x64/Debug/Windows_Date.log @@ -0,0 +1,3 @@ + Date.cpp +E:\Git 仓库\公开仓库\1_Date\Windows_Date\Date.hpp(277): warning C4715: “Lenyiin::Date::operator[]”: 不是所有的控件路径都返回值 + Windows_Date.vcxproj -> E:\Git 仓库\公开仓库\1_Date\Windows_Date\x64\Debug\Windows_Date.exe diff --git a/Windows_Date/x64/Debug/Windows_Date.pdb b/Windows_Date/x64/Debug/Windows_Date.pdb new file mode 100644 index 0000000..7a215d6 Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.pdb differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/CL.command.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.command.1.tlog new file mode 100644 index 0000000..f9b18ba Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.command.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/CL.read.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.read.1.tlog new file mode 100644 index 0000000..1782230 Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.read.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/CL.write.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.write.1.tlog new file mode 100644 index 0000000..5bf9972 Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/CL.write.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/Cl.items.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/Cl.items.tlog new file mode 100644 index 0000000..34b39e5 --- /dev/null +++ b/Windows_Date/x64/Debug/Windows_Date.tlog/Cl.items.tlog @@ -0,0 +1 @@ +E:\Git 仓库\公开仓库\1_Date\Windows_Date\Date.cpp;E:\Git 仓库\公开仓库\1_Date\Windows_Date\x64\Debug\Date.obj diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/Windows_Date.lastbuildstate b/Windows_Date/x64/Debug/Windows_Date.tlog/Windows_Date.lastbuildstate new file mode 100644 index 0000000..5df7df0 --- /dev/null +++ b/Windows_Date/x64/Debug/Windows_Date.tlog/Windows_Date.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.37.32822:TargetPlatformVersion=10.0.22000.0: +Debug|x64|E:\Git 仓库\公开仓库\1_Date\Windows_Date\| diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/link.command.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/link.command.1.tlog new file mode 100644 index 0000000..afd5b3d Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/link.command.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/link.read.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/link.read.1.tlog new file mode 100644 index 0000000..2e92495 Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/link.read.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.tlog/link.write.1.tlog b/Windows_Date/x64/Debug/Windows_Date.tlog/link.write.1.tlog new file mode 100644 index 0000000..935628f Binary files /dev/null and b/Windows_Date/x64/Debug/Windows_Date.tlog/link.write.1.tlog differ diff --git a/Windows_Date/x64/Debug/Windows_Date.vcxproj.FileListAbsolute.txt b/Windows_Date/x64/Debug/Windows_Date.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..8b3155a --- /dev/null +++ b/Windows_Date/x64/Debug/Windows_Date.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +E:\Git 仓库\公开仓库\1_Date\Windows_Date\x64\Debug\Windows_Date.exe diff --git a/Windows_Date/x64/Debug/vc143.idb b/Windows_Date/x64/Debug/vc143.idb new file mode 100644 index 0000000..331f748 Binary files /dev/null and b/Windows_Date/x64/Debug/vc143.idb differ diff --git a/Windows_Date/x64/Debug/vc143.pdb b/Windows_Date/x64/Debug/vc143.pdb new file mode 100644 index 0000000..44d21ae Binary files /dev/null and b/Windows_Date/x64/Debug/vc143.pdb differ