Initial commit
This commit is contained in:
@@ -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
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/chrono_io.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/date.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/ios.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/islamic.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/iso_week.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/julian.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/ptz.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/solar_hijri.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/tz.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../date/include/date/tz_private.h
|
||||
Reference in New Issue
Block a user