aboutsummaryrefslogtreecommitdiff
path: root/include/datetime/date-time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/datetime/date-time.h')
-rw-r--r--include/datetime/date-time.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h
index 2ad7856..f861c2e 100644
--- a/include/datetime/date-time.h
+++ b/include/datetime/date-time.h
@@ -36,21 +36,29 @@ class DateTime
{
public:
static DateTime NowLocal();
+ static DateTime Local(int years, int months, int days, int hours, int minutes, int seconds);
+
explicit DateTime(time_t t);
explicit DateTime(GDateTime* in=nullptr);
DateTime& operator=(GDateTime* in);
DateTime& operator=(const DateTime& in);
DateTime to_timezone(const std::string& zone) const;
+ DateTime add_full(int years, int months, int days, int hours, int minutes, double seconds) const;
void reset(GDateTime* in=nullptr);
GDateTime* get() const;
GDateTime* operator()() const {return get();}
std::string format(const std::string& fmt) const;
+ void ymd(int& year, int& month, int& day) const;
int day_of_month() const;
+ int hour() const;
+ int minute() const;
+ double seconds() const;
int64_t to_unix() const;
bool operator<(const DateTime& that) const;
+ bool operator<=(const DateTime& that) const;
bool operator!=(const DateTime& that) const;
bool operator==(const DateTime& that) const;