41#ifndef _DWMDATETIME_HH_
42#define _DWMDATETIME_HH_
145 std::string
Formatted(
const std::string & format)
const;
153 bool Parse(
const std::string & s,
const std::string & format);
Dwm::TimeValue64 class definition.
Dwm::TimeValue class definition.
This class just encapsulates a struct tm and some of the typical functionality for dealing with date ...
Definition DwmDateTime.hh:63
uint8_t DayOfMonth() const
Returns the day of the month (1 - 31).
TimeValue GetTimeValue() const
Return the equivalent TimeValue, using the current timezone setting.
std::string Formatted(const std::string &format) const
Returns a string formatted according to format.
std::string TimeZone() const
Returns the time zone.
bool operator==(const DateTime &dt) const
operator ==
uint8_t DayOfWeek() const
Returns the day of the week (Sunday == 0)
bool Parse(const std::string &s, const std::string &format)
Parses time string s according to the given format.
DateTime(const Dwm::TimeValue64 &tv)
Construct from a TimeValue64.
bool operator<(const DateTime &dt) const
operator <
DateTime(bool now=false)
Constructor.
uint16_t Year() const
Returns the year.
TimeValue64 GetTimeValue64() const
Return the equivalent TimeValue64, using the current timezone setting.
uint8_t Sec() const
Returns the seconds (0 - 59).
DateTime(const TimeValue &tv)
Construct from a TimeValue.
uint8_t Min() const
Returns the minutes (0 - 59).
uint8_t Month() const
Returns the month of the year (1 - 12).
bool IsDaylightSavings() const
Returns true if daylight savings is in effect.
uint16_t DayOfYear() const
Returns the day of the year (0 - 365).
uint8_t Hour() const
Returns the hour (0 - 23).
This class encapsulates a time value beyond the UNIX epoch, with microsecond granularity.
Definition DwmTimeValue64.hh:67
This class encapsulates a time value beyond the UNIX epoch, with microsecond granularity.
Definition DwmTimeValue.hh:68