teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Namespaces | Typedefs | Functions
time_utils.h File Reference
#include <ctime>
#include <string>
#include <chrono>

Go to the source code of this file.

Namespaces

 teditor
 

Typedefs

typedef std::chrono::system_clock::time_point teditor::TimePoint
 

Functions

bool teditor::operator> (const struct timeval &ta, const struct timeval &tb)
 
struct tm teditor::toStructTm (const TimePoint &pt)
 
TimePoint teditor::toTimePoint (struct tm &tm_)
 
std::string teditor::timeToStr (const TimePoint &pt)
 
std::string teditor::timeToDateStr (const TimePoint &pt)
 
std::string teditor::currentTimeToStr ()
 
TimePoint teditor::timeFromStr (const std::string &dt)
 
int teditor::dayOfWeek (const TimePoint &pt)
 
int teditor::year (const TimePoint &pt)
 
int teditor::month (const TimePoint &pt)
 
int teditor::day (const TimePoint &pt)
 
void teditor::addSecond (TimePoint &pt)
 
void teditor::addMinute (TimePoint &pt)
 
void teditor::addHour (TimePoint &pt)
 
void teditor::addDay (TimePoint &pt, int times)
 
void teditor::addWeek (TimePoint &pt, int times)
 
void teditor::addMonth (TimePoint &pt)
 
void teditor::addYear (TimePoint &pt)
 
TimePoint teditor::addSecond (const TimePoint &pt)
 
TimePoint teditor::addMinute (const TimePoint &pt)
 
TimePoint teditor::addHour (const TimePoint &pt)
 
TimePoint teditor::addDay (const TimePoint &pt, int times)
 
TimePoint teditor::addWeek (const TimePoint &pt, int times)
 
TimePoint teditor::addMonth (const TimePoint &pt)
 
TimePoint teditor::addYear (const TimePoint &pt)
 
void teditor::weekFor (TimePoint &start, TimePoint &end, const TimePoint &pt)