MythTV  master
Namespaces | Typedefs | Enumerations | Functions
mythdate.h File Reference
#include <QDateTime>
#include <QString>
#include "mythbaseexp.h"
Include dependency graph for mythdate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.




typedef enum MythDate::Formats MythDate::Format


enum  MythDate::Formats {
  MythDate::ISODate = Qt::ISODate, MythDate::kFilename = 0x000100, MythDate::kDateFull = 0x000200, MythDate::kDateShort = 0x000400,
  MythDate::kDateEither = kDateFull | kDateShort, MythDate::kTime = 0x000800, MythDate::kDateTimeFull = kDateFull | kTime, MythDate::kDateTimeShort = kDateShort | kTime,
  MythDate::kAddYear = 0x001000, MythDate::kSimplify = 0x002000, MythDate::kDatabase = 0x004000, MythDate::kAutoYear = 0x008000,
  MythDate::kScreenShotFilename = 0x010000, MythDate::kRFC822 = 0x020000, MythDate::kOverrideUTC = 0x100000, MythDate::kOverrideLocal = 0x200000


QDateTime MythDate::current (bool stripped=false)
 Returns current Date and Time in UTC. More...
QString MythDate::current_iso_string (bool stripped=false)
 Returns current Date and Time in UTC as a string. More...
QDateTime MythDate::as_utc (const QDateTime &dt)
 Returns copy of QDateTime with TimeSpec set to UTC. More...
QDateTime MythDate::fromString (const QString &)
 Converts kFilename && kISODate formats to QDateTime. More...
MBASE_PUBLIC QDateTime MythDate::fromString (const QString &dt, const QString &format)
 Converts dy in format to QDateTime. More...
MBASE_PUBLIC QDateTime MythDate::fromSecsSinceEpoch (uint seconds)
 This function takes the number of seconds since the start of the epoch and returns a QDateTime with the equivalent value. More...
QString MythDate::toString (const QDateTime &datetime, uint format=MythDate::kDateTimeFull)
 Returns formatted string representing the time. More...
QString MythDate::toString (const QDate &date, uint format)
 Returns a formatted QString based on the supplied QDate. More...
int MythDate::toSeconds (const QTime &time)
 Returns the total number of seconds since midnight of the supplied QTime. More...