|
MythTV master
|
#include <cstdint>#include <QDateTime>#include <QString>#include "mythbaseexp.h"#include "mythchrono.h"Go to the source code of this file.
Namespaces | |
| namespace | MythDate |
Enumerations | |
| enum | MythDate::Format { 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 } |
Functions | |
| 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 &dtstr) |
| 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 (int64_t 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... | |
| std::chrono::seconds | MythDate::toSeconds (QTime time) |
| Returns the total number of seconds since midnight of the supplied QTime. More... | |
| std::chrono::milliseconds | MythDate::currentMSecsSinceEpochAsDuration (void) |
| std::chrono::seconds | MythDate::secsInPast (const QDateTime &past) |
| std::chrono::seconds | MythDate::secsInFuture (const QDateTime &future) |
| QString | MythDate::formatTime (std::chrono::milliseconds msecs, QString fmt) |
| Format a milliseconds time value. More... | |