|
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
DateTime class, which uses FileTime as it's base. More...
#include <XBDateTime.h>
Public Types | |
| enum class | ReturnFormat : bool { CHOICE_YES = true , CHOICE_NO = false } |
Public Member Functions | |
| CDateTime () | |
| CDateTime (const CDateTime &time) | |
| CDateTime & | operator= (const CDateTime &)=default |
| CDateTime (const KODI::TIME::SystemTime &time) | |
| CDateTime (const KODI::TIME::FileTime &time) | |
| CDateTime (const time_t &time) | |
| CDateTime (const tm &time) | |
| CDateTime (int year, int month, int day, int hour, int minute, int second) | |
| const CDateTime & | operator= (const KODI::TIME::SystemTime &right) |
| const CDateTime & | operator= (const KODI::TIME::FileTime &right) |
| const CDateTime & | operator= (const time_t &right) |
| const CDateTime & | operator= (const tm &right) |
| bool | operator> (const CDateTime &right) const |
| bool | operator>= (const CDateTime &right) const |
| bool | operator< (const CDateTime &right) const |
| bool | operator<= (const CDateTime &right) const |
| bool | operator== (const CDateTime &right) const |
| bool | operator!= (const CDateTime &right) const |
| bool | operator> (const KODI::TIME::FileTime &right) const |
| bool | operator>= (const KODI::TIME::FileTime &right) const |
| bool | operator< (const KODI::TIME::FileTime &right) const |
| bool | operator<= (const KODI::TIME::FileTime &right) const |
| bool | operator== (const KODI::TIME::FileTime &right) const |
| bool | operator!= (const KODI::TIME::FileTime &right) const |
| bool | operator> (const KODI::TIME::SystemTime &right) const |
| bool | operator>= (const KODI::TIME::SystemTime &right) const |
| bool | operator< (const KODI::TIME::SystemTime &right) const |
| bool | operator<= (const KODI::TIME::SystemTime &right) const |
| bool | operator== (const KODI::TIME::SystemTime &right) const |
| bool | operator!= (const KODI::TIME::SystemTime &right) const |
| bool | operator> (const time_t &right) const |
| bool | operator>= (const time_t &right) const |
| bool | operator< (const time_t &right) const |
| bool | operator<= (const time_t &right) const |
| bool | operator== (const time_t &right) const |
| bool | operator!= (const time_t &right) const |
| bool | operator> (const tm &right) const |
| bool | operator>= (const tm &right) const |
| bool | operator< (const tm &right) const |
| bool | operator<= (const tm &right) const |
| bool | operator== (const tm &right) const |
| bool | operator!= (const tm &right) const |
| CDateTime | operator+ (const CDateTimeSpan &right) const |
| CDateTime | operator- (const CDateTimeSpan &right) const |
| const CDateTime & | operator+= (const CDateTimeSpan &right) |
| const CDateTime & | operator-= (const CDateTimeSpan &right) |
| CDateTimeSpan | operator- (const CDateTime &right) const |
| operator KODI::TIME::FileTime () const | |
| void | Archive (CArchive &ar) override |
| void | Reset () |
| int | GetDay () const |
| int | GetMonth () const |
| int | GetYear () const |
| int | GetHour () const |
| int | GetMinute () const |
| int | GetSecond () const |
| int | GetDayOfWeek () const |
| int | GetMinuteOfDay () const |
| bool | SetDateTime (int year, int month, int day, int hour, int minute, int second) |
| bool | SetDate (int year, int month, int day) |
| bool | SetTime (int hour, int minute, int second) |
| bool | SetFromDateString (const std::string &date) |
| bool | SetFromDBDate (const std::string &date) |
| bool | SetFromDBTime (const std::string &time) |
| bool | SetFromW3CDate (const std::string &date) |
| bool | SetFromW3CDateTime (const std::string &date, bool ignoreTimezone=false) |
| bool | SetFromUTCDateTime (const CDateTime &dateTime) |
| bool | SetFromUTCDateTime (const time_t &dateTime) |
| bool | SetFromRFC1123DateTime (const std::string &dateTime) |
| bool | SetFromRFC3339FullDate (std::string_view date) |
| Set from RFC3339 full-date format YYYY-MM-DD only. | |
| bool | SetFromDBDateTime (const std::string &dateTime) |
| set from a database datetime format YYYY-MM-DD HH:MM:SS | |
| void | GetAsSystemTime (KODI::TIME::SystemTime &time) const |
| void | GetAsTime (time_t &time) const |
| void | GetAsTm (tm &time) const |
| void | GetAsTimeStamp (KODI::TIME::FileTime &time) const |
| CDateTime | GetAsUTCDateTime () const |
| std::string | GetAsSaveString () const |
| std::string | GetAsDBDateTime () const |
| std::string | GetAsDBDate () const |
| std::string | GetAsDBTime () const |
| std::string | GetAsLocalizedDate (bool longDate=false) const |
| std::string | GetAsLocalizedDate (const std::string &strFormat) const |
| std::string | GetAsLocalizedDate (const std::string &strFormat, ReturnFormat returnFormat) const |
| std::string | GetAsLocalizedTime (const std::string &format, bool withSeconds=true) const |
| std::string | GetAsLocalizedDateTime (bool longDate=false, bool withSeconds=true) const |
| std::string | GetAsLocalizedTime (TIME_FORMAT format, bool withSeconds=false) const |
| std::string | GetAsRFC1123DateTime () const |
| std::string | GetAsW3CDate () const |
| std::string | GetAsW3CDateTime (bool asUtc=false) const |
| void | SetValid (bool yesNo) |
| bool | IsValid () const |
| CDateTimeSpan | GetTimezoneBias () const |
| Get system timezone bias for this datetime value. | |
| void | SetTimeZoneBias (const CDateTimeSpan &bias) |
| Set timezone bias for this datetime value (for testing purposes). | |
Public Member Functions inherited from IArchivable | |
Static Public Member Functions | |
| static CDateTime | GetCurrentDateTime () |
| static CDateTime | GetUTCDateTime () |
| static int | MonthStringToMonthNum (const std::string &month) |
| static CDateTime | FromDBDateTime (const std::string &dateTime) |
| static CDateTime | FromDateString (const std::string &date) |
| static CDateTime | FromDBDate (const std::string &date) |
| static CDateTime | FromDBTime (const std::string &time) |
| static CDateTime | FromW3CDate (const std::string &date) |
| static CDateTime | FromW3CDateTime (const std::string &date, bool ignoreTimezone=false) |
| static CDateTime | FromUTCDateTime (const CDateTime &dateTime) |
| static CDateTime | FromUTCDateTime (const time_t &dateTime) |
| static CDateTime | FromRFC1123DateTime (const std::string &dateTime) |
Additional Inherited Members | |
Protected Member Functions inherited from IArchivable | |
| virtual | ~IArchivable ()=default |
DateTime class, which uses FileTime as it's base.
|
strong |
| CDateTime::CDateTime | ( | ) |
|
default |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
Implements IArchivable.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| std::string CDateTime::GetAsDBDate | ( | ) | const |
| std::string CDateTime::GetAsDBDateTime | ( | ) | const |
| std::string CDateTime::GetAsDBTime | ( | ) | const |
| std::string CDateTime::GetAsLocalizedDate | ( | bool | longDate = false | ) | const |
| std::string CDateTime::GetAsLocalizedDate | ( | const std::string & | strFormat | ) | const |
| std::string CDateTime::GetAsLocalizedDate | ( | const std::string & | strFormat, |
| ReturnFormat | returnFormat ) const |
| std::string CDateTime::GetAsLocalizedDateTime | ( | bool | longDate = false, |
| bool | withSeconds = true ) const |
| std::string CDateTime::GetAsLocalizedTime | ( | const std::string & | format, |
| bool | withSeconds = true ) const |
| std::string CDateTime::GetAsLocalizedTime | ( | TIME_FORMAT | format, |
| bool | withSeconds = false ) const |
| std::string CDateTime::GetAsRFC1123DateTime | ( | ) | const |
| std::string CDateTime::GetAsSaveString | ( | ) | const |
| void CDateTime::GetAsSystemTime | ( | KODI::TIME::SystemTime & | time | ) | const |
| void CDateTime::GetAsTime | ( | time_t & | time | ) | const |
| void CDateTime::GetAsTimeStamp | ( | KODI::TIME::FileTime & | time | ) | const |
| void CDateTime::GetAsTm | ( | tm & | time | ) | const |
| CDateTime CDateTime::GetAsUTCDateTime | ( | ) | const |
| std::string CDateTime::GetAsW3CDate | ( | ) | const |
| std::string CDateTime::GetAsW3CDateTime | ( | bool | asUtc = false | ) | const |
|
static |
| int CDateTime::GetDay | ( | ) | const |
| int CDateTime::GetDayOfWeek | ( | ) | const |
| int CDateTime::GetHour | ( | ) | const |
| int CDateTime::GetMinute | ( | ) | const |
| int CDateTime::GetMinuteOfDay | ( | ) | const |
| int CDateTime::GetMonth | ( | ) | const |
| int CDateTime::GetSecond | ( | ) | const |
| CDateTimeSpan CDateTime::GetTimezoneBias | ( | ) | const |
Get system timezone bias for this datetime value.
|
static |
| int CDateTime::GetYear | ( | ) | const |
| bool CDateTime::IsValid | ( | ) | const |
|
static |
| CDateTime::operator KODI::TIME::FileTime | ( | ) | const |
| bool CDateTime::operator!= | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator!= | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator!= | ( | const time_t & | right | ) | const |
| bool CDateTime::operator!= | ( | const tm & | right | ) | const |
| CDateTime CDateTime::operator+ | ( | const CDateTimeSpan & | right | ) | const |
| const CDateTime & CDateTime::operator+= | ( | const CDateTimeSpan & | right | ) |
| CDateTimeSpan CDateTime::operator- | ( | const CDateTime & | right | ) | const |
| CDateTime CDateTime::operator- | ( | const CDateTimeSpan & | right | ) | const |
| const CDateTime & CDateTime::operator-= | ( | const CDateTimeSpan & | right | ) |
| bool CDateTime::operator< | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator< | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator< | ( | const time_t & | right | ) | const |
| bool CDateTime::operator< | ( | const tm & | right | ) | const |
| bool CDateTime::operator<= | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator<= | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator<= | ( | const time_t & | right | ) | const |
| bool CDateTime::operator<= | ( | const tm & | right | ) | const |
| const CDateTime & CDateTime::operator= | ( | const KODI::TIME::FileTime & | right | ) |
| const CDateTime & CDateTime::operator= | ( | const KODI::TIME::SystemTime & | right | ) |
| const CDateTime & CDateTime::operator= | ( | const time_t & | right | ) |
| const CDateTime & CDateTime::operator= | ( | const tm & | right | ) |
| bool CDateTime::operator== | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator== | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator== | ( | const time_t & | right | ) | const |
| bool CDateTime::operator== | ( | const tm & | right | ) | const |
| bool CDateTime::operator> | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator> | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator> | ( | const time_t & | right | ) | const |
| bool CDateTime::operator> | ( | const tm & | right | ) | const |
| bool CDateTime::operator>= | ( | const KODI::TIME::FileTime & | right | ) | const |
| bool CDateTime::operator>= | ( | const KODI::TIME::SystemTime & | right | ) | const |
| bool CDateTime::operator>= | ( | const time_t & | right | ) | const |
| bool CDateTime::operator>= | ( | const tm & | right | ) | const |
| void CDateTime::Reset | ( | ) |
| bool CDateTime::SetFromDBDate | ( | const std::string & | date | ) |
| bool CDateTime::SetFromDBDateTime | ( | const std::string & | dateTime | ) |
set from a database datetime format YYYY-MM-DD HH:MM:SS
| bool CDateTime::SetFromDBTime | ( | const std::string & | time | ) |
| bool CDateTime::SetFromRFC1123DateTime | ( | const std::string & | dateTime | ) |
| bool CDateTime::SetFromRFC3339FullDate | ( | std::string_view | date | ) |
Set from RFC3339 full-date format YYYY-MM-DD only.
| [in] | date | input date. |
| bool CDateTime::SetFromUTCDateTime | ( | const time_t & | dateTime | ) |
| bool CDateTime::SetFromW3CDate | ( | const std::string & | date | ) |
|
inline |
Set timezone bias for this datetime value (for testing purposes).
| bias | The bias to set. |