datetime.h
// Copyright (c) 2000-2002 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_DATETIME_H
#define RUDIMENTS_DATETIME_H
#include <rudiments/private/datetimeincludes.h>
class datetimeprivate;
class RUDIMENTS_DLLSPEC datetime {
public:
datetime();
~datetime();
bool initialize(const char *tmstring);
bool initialize(time_t seconds);
bool initialize(time_t seconds, time_t microseconds);
bool initialize(const void *tmstruct);
bool getSystemDateAndTime();
bool getHardwareDateAndTime(const char *hwtz);
bool getAdjustedHardwareDateAndTime(const char *hwtz);
bool setSystemDateAndTime();
bool setHardwareDateAndTime(const char *hwtz);
int32_t getHour() const;
int32_t getMinutes() const;
int32_t getSeconds() const;
int32_t getMicroseconds() const;
int32_t getMonth() const;
const char *getMonthName() const;
const char *getMonthAbbreviation() const;
int32_t getDayOfMonth() const;
int32_t getDayOfWeek() const;
int32_t getDayOfYear() const;
int32_t getYear() const;
bool isDaylightSavingsTime() const;
const char *getTimeZoneString() const;
int32_t getTimeZoneOffset() const;
bool adjustTimeZone(const char *newtz);
bool adjustTimeZone(const char *newtz, bool ignoredst);
bool setSeconds(int32_t seconds);
bool setMicroseconds(int32_t microseconds);
bool setMinutes(int32_t minutes);
bool setHours(int32_t hours);
bool setDays(int32_t days);
bool setMonths(int32_t months);
bool setYears(int32_t years);
bool addSeconds(int32_t seconds);
bool addMicroseconds(int32_t microseconds);
bool addMinutes(int32_t minutes);
bool addHours(int32_t hours);
bool addDays(int32_t days);
bool addMonths(int32_t months);
bool addYears(int32_t years);
const char *getString();
const char *getString(bool microseconds);
time_t getEpoch() const;
static const char * const *getTimeZoneAbbreviations();
static const int32_t *getTimeZoneOffsets();
static bool validDateTime(const char *string);
static char *getString(time_t seconds);
static char *getString(time_t seconds, time_t microseconds);
static char *getString(const void *tmstruct);
static time_t getEpoch(const char *datestring);
static time_t getEpoch(const void *tmstruct);
static void setTimeMutex(threadmutex *mtx);
#include <rudiments/private/datetime.h>
};
#endif
threadmutex
Definition: threadmutex.h:13
datetime
Definition: datetime.h:14