GATE
Loading...
Searching...
No Matches
DateTime Struct Reference

Date-time class (Date + DayTime: year-month-day-hour-minute-second-microsecond) More...

#include <times.hpp>

Public Member Functions

Time toTime () const
 
String toString (String const &format=String()) const
 
DateTime add (int64_t microseconds) const
 
int64_t diff (DateTime const &dt) const
 
int compare (DateTime const &that) const
 

Detailed Description

Date-time class (Date + DayTime: year-month-day-hour-minute-second-microsecond)

Member Function Documentation

◆ toTime()

Time toTime ( ) const

Converts date-time to timestamp

◆ toString()

String toString ( String const & format = String()) const

Prints date-time as formated string

◆ add()

DateTime add ( int64_t microseconds) const

Creates new date-time by adding microseconds to current value

◆ diff()

int64_t diff ( DateTime const & dt) const

Returns difference in microseconds between current and given date-time value

◆ compare()

int compare ( DateTime const & that) const

compares dates, returns -1 if *this < that, +1 if *this > that, 0 if equal


The documentation for this struct was generated from the following files: