Initial commit

This commit is contained in:
2020-05-04 21:22:57 +02:00
commit f61d7fd7af
22 changed files with 134 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#ifndef DATETIME_H
#define DATETIME_H
#include "date.h"
#include "tz.h"
#include <chrono>
#include <string>
namespace DateTime {
struct DateTime
{
DateTime(int year, unsigned month, unsigned day) : year(year), month(month), day(day) {}
int year;
unsigned month;
unsigned day;
int hour = 0;
int min = 0;
int sec = 0;
};
std::chrono::system_clock::time_point DateTime_UTC_to_time_point(const DateTime& dt);
std::chrono::system_clock::time_point DateTime_to_time_point(const DateTime& dt, const date::time_zone* tzone);
int GetTimestamp();
int GetUTCOffset();
std::string GetTimeString();
std::string GetTimeString(const std::chrono::system_clock::time_point& timePoint);
} // namespace DateTime
#endif // DATETIME_H
+1
View File
@@ -0,0 +1 @@
../../date/include/date/chrono_io.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/date.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/ios.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/islamic.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/iso_week.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/julian.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/ptz.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/solar_hijri.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/tz.h
+1
View File
@@ -0,0 +1 @@
../../date/include/date/tz_private.h