SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <tm.h>
Public Member Functions | |
TTm () | |
TTm (const TTm &Tm) | |
TTm (const int &_Year, const int &_Month, const int &_Day, const int &_DayOfWeek=-1, const int &_Hour=0, const int &_Min=0, const int &_Sec=0, const int &_MSec=0) | |
TTm (const TSecTm &SecTm) | |
~TTm () | |
TTm (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
TTm & | operator= (const TTm &Tm) |
bool | operator== (const TTm &Tm) const |
bool | operator< (const TTm &Tm) const |
int | GetMemUsed () const |
int | GetPrimHashCd () const |
int | GetSecHashCd () const |
bool | IsDef () const |
void | Undef () |
bool | IsTimeDef () const |
int | GetYear () const |
int | GetMonth () const |
TStr | GetMonthNm () const |
int | GetDay () const |
int | GetDayOfWeek () const |
TStr | GetDayOfWeekNm () const |
int | GetHour () const |
int | GetMin () const |
int | GetSec () const |
int | GetMSec () const |
TStr | GetStr (const bool &MSecP=true) const |
TStr | GetYMDDashStr () const |
TStr | GetHMSTColonDotStr (const bool &FullP=false, const bool &MSecP=true) const |
TStr | GetWebLogDateStr () const |
TStr | GetWebLogTimeStr () const |
TStr | GetWebLogDateTimeStr (const bool &FullP=false, const TStr &DateTimeSepCh=" ", const bool &MSecP=true) const |
TStr | GetIdStr () const |
TSecTm | GetSecTm () const |
void | AddTime (const int &Hours, const int &Mins=0, const int &Secs=0, const int &MSecs=0) |
void | AddDays (const int &Days) |
void | SubTime (const int &Hours, const int &Mins=0, const int &Secs=0, const int &MSecs=0) |
void | SubDays (const int &Days) |
Static Public Member Functions | |
static TTm | GetCurUniTm () |
static TTm | GetUniqueCurUniTm () |
static TTm | GetUniqueCurUniTm (const int &UniqueSpaces, const int &UniqueSpaceN) |
static TTm | GetCurLocTm () |
static uint64 | GetCurUniMSecs () |
static uint64 | GetCurLocMSecs () |
static uint64 | GetMSecsFromTm (const TTm &Tm) |
static TTm | GetTmFromMSecs (const uint64 &MSecs) |
static uint | GetMSecsFromOsStart () |
static uint64 | GetPerfTimerFq () |
static uint64 | GetPerfTimerTicks () |
static void | GetDiff (const TTm &Tm1, const TTm &Tm2, int &Days, int &Hours, int &Mins, int &Secs, int &MSecs) |
static uint64 | GetDiffMSecs (const TTm &Tm1, const TTm &Tm2) |
static uint64 | GetDiffSecs (const TTm &Tm1, const TTm &Tm2) |
static uint64 | GetDiffMins (const TTm &Tm1, const TTm &Tm2) |
static uint64 | GetDiffHrs (const TTm &Tm1, const TTm &Tm2) |
static uint64 | GetDiffDays (const TTm &Tm1, const TTm &Tm2) |
static TTm | GetLocTmFromUniTm (const TTm &Tm) |
static TTm | GetUniTmFromLocTm (const TTm &Tm) |
static TTm | GetTmFromWebLogTimeStr (const TStr &TimeStr, const char TimeSepCh=':', const char MSecSepCh='.') |
static TTm | GetTmFromWebLogDateTimeStr (const TStr &DateTimeStr, const char DateSepCh='-', const char TimeSepCh=':', const char MSecSepCh='.', const char DateTimeSepCh=' ') |
static TTm | GetTmFromIdStr (const TStr &IdStr) |
static uint | GetDateTimeInt (const int &Year=0, const int &Month=1, const int &Day=1, const int &Hour=0, const int &Min=0, const int &Sec=0) |
static uint | GetDateIntFromTm (const TTm &Tm) |
static uint | GetMonthIntFromTm (const TTm &Tm) |
static uint | GetYearIntFromTm (const TTm &Tm) |
static uint | GetDateTimeIntFromTm (const TTm &Tm) |
static TTm | GetTmFromDateTimeInt (const uint &DateTimeInt) |
static TSecTm | GetSecTmFromDateTimeInt (const uint &DateTimeInt) |
static uint | KeepMonthInDateTimeInt (const uint &DateTimeInt) |
static uint | KeepDayInDateTimeInt (const uint &DateTimeInt) |
static uint | KeepHourInDateTimeInt (const uint &DateTimeInt) |
Private Attributes | |
TInt | Year |
TInt | Month |
TInt | Day |
TInt | DayOfWeek |
TInt | Hour |
TInt | Min |
TInt | Sec |
TInt | MSec |
TTm::TTm | ( | ) | [inline] |
Definition at line 217 of file tm.h.
Referenced by GetMemUsed(), GetTmFromDateTimeInt(), GetTmFromIdStr(), and GetTmFromWebLogDateTimeStr().
TTm::TTm | ( | const int & | _Year, |
const int & | _Month, | ||
const int & | _Day, | ||
const int & | _DayOfWeek = -1 , |
||
const int & | _Hour = 0 , |
||
const int & | _Min = 0 , |
||
const int & | _Sec = 0 , |
||
const int & | _MSec = 0 |
||
) | [inline] |
void TTm::AddDays | ( | const int & | Days | ) | [inline] |
void TTm::AddTime | ( | const int & | Hours, |
const int & | Mins = 0 , |
||
const int & | Secs = 0 , |
||
const int & | MSecs = 0 |
||
) |
Definition at line 1005 of file tm.cpp.
References GetMSecsFromTm(), and GetTmFromMSecs().
Referenced by AddDays(), and GetUniqueCurUniTm().
{ uint64 TmMSecs=TTm::GetMSecsFromTm(*this); TmMSecs+=(uint64(Hours)*uint64(3600)*uint64(1000)); TmMSecs+=(uint64(Mins)*uint64(60)*uint64(1000)); TmMSecs+=(uint64(Secs)*uint64(1000)); TmMSecs+=uint64(MSecs); *this=GetTmFromMSecs(TmMSecs); }
uint64 TTm::GetCurLocMSecs | ( | ) | [static] |
Definition at line 1064 of file tm.cpp.
{ return TSysTm::GetCurLocMSecs(); }
TTm TTm::GetCurLocTm | ( | ) | [static] |
Definition at line 1056 of file tm.cpp.
Referenced by TLogNotify::OnStatus().
{ return TSysTm::GetCurLocTm(); }
uint64 TTm::GetCurUniMSecs | ( | ) | [static] |
Definition at line 1060 of file tm.cpp.
Referenced by GetUniqueCurUniTm().
{ return TSysTm::GetCurUniMSecs(); }
TTm TTm::GetCurUniTm | ( | ) | [static] |
Definition at line 1025 of file tm.cpp.
Referenced by GetUniqueCurUniTm(), TFPathNotify::OnStatus(), and TFPathNotify::TFPathNotify().
{ return TSysTm::GetCurUniTm(); }
uint TTm::GetDateIntFromTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1238 of file tm.cpp.
References GetDateTimeInt(), GetDay(), GetMonth(), GetYear(), and IsDef().
{ return Tm.IsDef() ? GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay()) : 0; }
uint TTm::GetDateTimeInt | ( | const int & | Year = 0 , |
const int & | Month = 1 , |
||
const int & | Day = 1 , |
||
const int & | Hour = 0 , |
||
const int & | Min = 0 , |
||
const int & | Sec = 0 |
||
) | [static] |
Definition at line 1232 of file tm.cpp.
References TSecTm::GetAbsSecs().
Referenced by GetDateIntFromTm(), GetDateTimeIntFromTm(), GetMonthIntFromTm(), GetYearIntFromTm(), KeepDayInDateTimeInt(), KeepHourInDateTimeInt(), and KeepMonthInDateTimeInt().
uint TTm::GetDateTimeIntFromTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1250 of file tm.cpp.
References GetDateTimeInt(), GetDay(), GetHour(), GetMin(), GetMonth(), GetSec(), GetYear(), and IsDef().
{ return Tm.IsDef() ? GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay(), Tm.GetHour(), Tm.GetMin(), Tm.GetSec()) : 0; }
int TTm::GetDay | ( | ) | const [inline] |
Definition at line 277 of file tm.h.
References Day.
Referenced by GetDateIntFromTm(), GetDateTimeIntFromTm(), and TFPathNotify::UpdateSOut().
{return Day;}
int TTm::GetDayOfWeek | ( | ) | const [inline] |
TStr TTm::GetDayOfWeekNm | ( | ) | const [inline] |
Definition at line 279 of file tm.h.
References DayOfWeek.
{return TTmInfo::GetDayOfWeekNm(DayOfWeek);}
void TTm::GetDiff | ( | const TTm & | Tm1, |
const TTm & | Tm2, | ||
int & | Days, | ||
int & | Hours, | ||
int & | Mins, | ||
int & | Secs, | ||
int & | MSecs | ||
) | [static] |
Definition at line 1088 of file tm.cpp.
References GetDiffMSecs().
{ const uint64 DiffMSecs = TTm::GetDiffMSecs(Tm1, Tm2); const uint64 DiffSecs = DiffMSecs / 1000; const uint64 DiffMins = DiffSecs / 60; const uint64 DiffHours = DiffMins / 60; MSecs = DiffMSecs % 1000; Secs = DiffSecs % 60; Mins = DiffMins % 60; Hours = DiffHours % 24; Days = (int)DiffHours / 24; }
static uint64 TTm::GetDiffDays | ( | const TTm & | Tm1, |
const TTm & | Tm2 | ||
) | [inline, static] |
Definition at line 324 of file tm.h.
References GetDiffMSecs().
{ return GetDiffMSecs(Tm1, Tm2)/uint64(1000*60*60*24);}
static uint64 TTm::GetDiffHrs | ( | const TTm & | Tm1, |
const TTm & | Tm2 | ||
) | [inline, static] |
Definition at line 322 of file tm.h.
References GetDiffMSecs().
{ return GetDiffMSecs(Tm1, Tm2)/uint64(1000*60*60);}
static uint64 TTm::GetDiffMins | ( | const TTm & | Tm1, |
const TTm & | Tm2 | ||
) | [inline, static] |
Definition at line 320 of file tm.h.
References GetDiffMSecs().
{ return GetDiffMSecs(Tm1, Tm2)/uint64(1000*60);}
uint64 TTm::GetDiffMSecs | ( | const TTm & | Tm1, |
const TTm & | Tm2 | ||
) | [static] |
Definition at line 1103 of file tm.cpp.
References GetMSecsFromTm().
Referenced by GetDiff(), GetDiffDays(), GetDiffHrs(), GetDiffMins(), and GetDiffSecs().
{ uint64 Tm1MSecs=GetMSecsFromTm(Tm1); uint64 Tm2MSecs=GetMSecsFromTm(Tm2); if (Tm1MSecs>Tm2MSecs){ return Tm1MSecs-Tm2MSecs; } else { return Tm2MSecs-Tm1MSecs; } }
static uint64 TTm::GetDiffSecs | ( | const TTm & | Tm1, |
const TTm & | Tm2 | ||
) | [inline, static] |
Definition at line 318 of file tm.h.
References GetDiffMSecs().
{ return GetDiffMSecs(Tm1, Tm2)/uint64(1000);}
TStr TTm::GetHMSTColonDotStr | ( | const bool & | FullP = false , |
const bool & | MSecP = true |
||
) | const |
Definition at line 979 of file tm.cpp.
References GetStr(), Hour, Min, MSec, and Sec.
Referenced by GetWebLogDateTimeStr(), GetWebLogTimeStr(), and TLogNotify::OnStatus().
{ TChA ChA; ChA+=TInt::GetStr(Hour, "%02d"); ChA+=':'; ChA+=TInt::GetStr(Min, "%02d"); if (FullP||((Sec!=0)||(MSec!=0))){ ChA+=':'; ChA+=TInt::GetStr(Sec, "%02d"); if ((MSecP)&&(FullP||(MSec!=0))){ ChA+='.'; ChA+=TInt::GetStr(MSec, "%d"); } } return ChA; }
int TTm::GetHour | ( | ) | const [inline] |
Definition at line 280 of file tm.h.
References Hour.
Referenced by GetDateTimeIntFromTm(), TFPathNotify::OnStatus(), and TFPathNotify::UpdateSOut().
{return Hour;}
TStr TTm::GetIdStr | ( | ) | const |
Definition at line 992 of file tm.cpp.
References Day, GetStr(), Hour, Min, Month, MSec, Sec, and Year.
{ TChA ChA; ChA+=TInt::GetStr(Year%100, "%02d"); ChA+=TInt::GetStr(Month, "%02d"); ChA+=TInt::GetStr(Day, "%02d"); ChA+=TInt::GetStr(Hour, "%02d"); ChA+=TInt::GetStr(Min, "%02d"); ChA+=TInt::GetStr(Sec, "%02d"); ChA+=TInt::GetStr(MSec, "%03d"); return ChA; }
TTm TTm::GetLocTmFromUniTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1113 of file tm.cpp.
{ return TSysTm::GetLocTmFromUniTm(Tm); }
int TTm::GetMemUsed | ( | ) | const [inline] |
int TTm::GetMin | ( | ) | const [inline] |
Definition at line 281 of file tm.h.
References Min.
Referenced by GetDateTimeIntFromTm().
{return Min;}
int TTm::GetMonth | ( | ) | const [inline] |
Definition at line 275 of file tm.h.
References Month.
Referenced by GetDateIntFromTm(), GetDateTimeIntFromTm(), GetMonthIntFromTm(), and TFPathNotify::UpdateSOut().
{return Month;}
uint TTm::GetMonthIntFromTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1242 of file tm.cpp.
References GetDateTimeInt(), GetMonth(), GetYear(), and IsDef().
{ return Tm.IsDef() ? GetDateTimeInt(Tm.GetYear(), Tm.GetMonth()) : 0; }
TStr TTm::GetMonthNm | ( | ) | const [inline] |
int TTm::GetMSec | ( | ) | const [inline] |
uint TTm::GetMSecsFromOsStart | ( | ) | [static] |
Definition at line 1076 of file tm.cpp.
{ return TSysTm::GetMSecsFromOsStart(); }
uint64 TTm::GetMSecsFromTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1068 of file tm.cpp.
Referenced by AddTime(), GetDiffMSecs(), and SubTime().
{ return TSysTm::GetMSecsFromTm(Tm); }
uint64 TTm::GetPerfTimerFq | ( | ) | [static] |
Definition at line 1080 of file tm.cpp.
{ return TSysTm::GetPerfTimerFq(); }
uint64 TTm::GetPerfTimerTicks | ( | ) | [static] |
Definition at line 1084 of file tm.cpp.
{ return TSysTm::GetPerfTimerTicks(); }
int TTm::GetPrimHashCd | ( | ) | const [inline] |
int TTm::GetSec | ( | ) | const [inline] |
Definition at line 282 of file tm.h.
References Sec.
Referenced by GetDateTimeIntFromTm().
{return Sec;}
int TTm::GetSecHashCd | ( | ) | const [inline] |
TSecTm TTm::GetSecTm | ( | ) | const [inline] |
TSecTm TTm::GetSecTmFromDateTimeInt | ( | const uint & | DateTimeInt | ) | [static] |
TStr TTm::GetStr | ( | const bool & | MSecP = true | ) | const |
Definition at line 957 of file tm.cpp.
References Day, Hour, Min, Month, MSec, Sec, and Year.
Referenced by GetHMSTColonDotStr(), GetIdStr(), and GetYMDDashStr().
{ TChA ChA; ChA+=TInt::GetStr(Year, "%04d"); ChA+='-'; // ChA+=GetMonthNm(); ChA+='-'; ChA+=TInt::GetStr(Month, "%02d"); ChA+='-'; ChA+=TInt::GetStr(Day, "%02d"); ChA+=' '; // ChA+=GetDayOfWeekNm(); ChA+=' '; ChA+=TInt::GetStr(Hour, "%02d"); ChA+=':'; ChA+=TInt::GetStr(Min, "%02d"); ChA+=':'; ChA+=TInt::GetStr(Sec, "%02d"); if (MSecP){ChA+='.'; ChA+=TInt::GetStr(MSec, "%04d");} return ChA; }
TTm TTm::GetTmFromDateTimeInt | ( | const uint & | DateTimeInt | ) | [static] |
TTm TTm::GetTmFromIdStr | ( | const TStr & | IdStr | ) | [static] |
Definition at line 1211 of file tm.cpp.
References IAssert, TChA::Ins(), TCh::IsNum(), TChA::Len(), and TTm().
{ // normalize TChA IdChA=IdStr; if (IdChA.Len()==14){ IdChA.Ins(0, "0");} // check IAssert(IdChA.Len()==15); for (int ChN=0; ChN<IdChA.Len(); ChN++){ IAssert(TCh::IsNum(IdChA[ChN]));} // extract parts int YearN=2000+(TStr(IdChA[0])+TStr(IdChA[1])).GetInt(); int MonthN=(TStr(IdChA[2])+TStr(IdChA[3])).GetInt(); int DayN=(TStr(IdChA[4])+TStr(IdChA[5])).GetInt(); int HourN=(TStr(IdChA[6])+TStr(IdChA[7])).GetInt(); int MinN=(TStr(IdChA[8])+TStr(IdChA[9])).GetInt(); int SecN=(TStr(IdChA[10])+TStr(IdChA[11])).GetInt(); int MSecN=(TStr(IdChA[12])+TStr(IdChA[13])+TStr(IdChA[14])).GetInt(); TTm Tm=TTm(YearN, MonthN, DayN, -1, HourN, MinN, SecN, MSecN); return Tm; }
TTm TTm::GetTmFromMSecs | ( | const uint64 & | MSecs | ) | [static] |
Definition at line 1072 of file tm.cpp.
Referenced by AddTime(), GetUniqueCurUniTm(), and SubTime().
{ return TSysTm::GetTmFromMSecs(MSecs); }
TTm TTm::GetTmFromWebLogDateTimeStr | ( | const TStr & | DateTimeStr, |
const char | DateSepCh = '-' , |
||
const char | TimeSepCh = ':' , |
||
const char | MSecSepCh = '.' , |
||
const char | DateTimeSepCh = ' ' |
||
) | [static] |
Definition at line 1155 of file tm.cpp.
References TChA::Clr(), TStr::GetInt(), TStr::Len(), and TTm().
{ int DateTimeStrLen=DateTimeStr.Len(); // year TChA ChA; int ChN=0; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=DateSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr YearStr=ChA; // month ChA.Clr(); ChN++; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=DateSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr MonthStr=ChA; // day ChA.Clr(); ChN++; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=DateTimeSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr DayStr=ChA; // hour ChA.Clr(); ChN++; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=TimeSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr HourStr=ChA; // minute ChA.Clr(); ChN++; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=TimeSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr MinStr=ChA; // second ChA.Clr(); ChN++; while ((ChN<DateTimeStrLen)&&(DateTimeStr[ChN]!=MSecSepCh)){ ChA+=DateTimeStr[ChN]; ChN++;} TStr SecStr=ChA; // mili-second ChA.Clr(); ChN++; while (ChN<DateTimeStrLen){ ChA+=DateTimeStr[ChN]; ChN++;} TStr MSecStr=ChA; // transform to numbers int YearN=YearStr.GetInt(-1); int MonthN=MonthStr.GetInt(-1); int DayN=DayStr.GetInt(-1); int HourN=HourStr.GetInt(0); int MinN=MinStr.GetInt(0); int SecN=SecStr.GetInt(0); int MSecN=MSecStr.GetInt(0); // construct time TTm Tm; if ((YearN!=-1)&&(MonthN!=-1)&&(DayN!=-1)){ Tm=TTm(YearN, MonthN, DayN, -1, HourN, MinN, SecN, MSecN); } // return time return Tm; }
TTm TTm::GetTmFromWebLogTimeStr | ( | const TStr & | TimeStr, |
const char | TimeSepCh = ':' , |
||
const char | MSecSepCh = '.' |
||
) | [static] |
Definition at line 1121 of file tm.cpp.
References TChA::Clr(), TStr::GetInt(), and TStr::Len().
{ int TimeStrLen=TimeStr.Len(); // year TChA ChA; int ChN=0; while ((ChN<TimeStrLen)&&(TimeStr[ChN]!=TimeSepCh)){ ChA+=TimeStr[ChN]; ChN++;} TStr HourStr=ChA; // minute ChA.Clr(); ChN++; while ((ChN<TimeStrLen)&&(TimeStr[ChN]!=TimeSepCh)){ ChA+=TimeStr[ChN]; ChN++;} TStr MinStr=ChA; // second ChA.Clr(); ChN++; while ((ChN<TimeStrLen)&&(TimeStr[ChN]!=MSecSepCh)){ ChA+=TimeStr[ChN]; ChN++;} TStr SecStr=ChA; // mili-second ChA.Clr(); ChN++; while (ChN<TimeStrLen){ ChA+=TimeStr[ChN]; ChN++;} TStr MSecStr=ChA; // transform to numbers int HourN=HourStr.GetInt(0); int MinN=MinStr.GetInt(0); int SecN=SecStr.GetInt(0); int MSecN=MSecStr.GetInt(0); // construct time TTm Tm(-1, -1, -1, -1, HourN, MinN, SecN, MSecN); // return time return Tm; }
TTm TTm::GetUniqueCurUniTm | ( | ) | [static] |
Definition at line 1029 of file tm.cpp.
References AddTime(), and GetCurUniTm().
{ static TTm LastUniqueTm=TSysTm::GetCurUniTm(); TTm CurUniqueTm=TSysTm::GetCurUniTm(); if (CurUniqueTm<LastUniqueTm){CurUniqueTm=LastUniqueTm;} if (CurUniqueTm==LastUniqueTm){CurUniqueTm.AddTime(0, 0, 0, 1);} LastUniqueTm=CurUniqueTm; return CurUniqueTm; }
TTm TTm::GetUniqueCurUniTm | ( | const int & | UniqueSpaces, |
const int & | UniqueSpaceN | ||
) | [static] |
Definition at line 1038 of file tm.cpp.
References Assert, GetCurUniMSecs(), and GetTmFromMSecs().
{ static uint64 LastMUniqueTmMSecs=TSysTm::GetCurUniMSecs(); // uniqueness-space-parameters range-check Assert(UniqueSpaces>=1&&UniqueSpaceN>=0&&UniqueSpaceN<UniqueSpaces); // get current time uint64 CurUniqueTmMSecs=TSysTm::GetCurUniMSecs(); if (CurUniqueTmMSecs<LastMUniqueTmMSecs){CurUniqueTmMSecs=LastMUniqueTmMSecs;} // normalize to uniqueness-space-grid CurUniqueTmMSecs-=CurUniqueTmMSecs%UniqueSpaces; CurUniqueTmMSecs+=UniqueSpaceN; // get next free unique-time if (CurUniqueTmMSecs<=LastMUniqueTmMSecs){ CurUniqueTmMSecs+=UniqueSpaces; } // update last-time LastMUniqueTmMSecs=CurUniqueTmMSecs; return GetTmFromMSecs(CurUniqueTmMSecs); }
TTm TTm::GetUniTmFromLocTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1117 of file tm.cpp.
{ return TSysTm::GetUniTmFromLocTm(Tm); }
TStr TTm::GetWebLogDateStr | ( | ) | const [inline] |
Definition at line 289 of file tm.h.
References GetYMDDashStr().
{return GetYMDDashStr();}
TStr TTm::GetWebLogDateTimeStr | ( | const bool & | FullP = false , |
const TStr & | DateTimeSepCh = " " , |
||
const bool & | MSecP = true |
||
) | const [inline] |
Definition at line 291 of file tm.h.
References GetHMSTColonDotStr(), and GetYMDDashStr().
{ return GetYMDDashStr()+DateTimeSepCh+GetHMSTColonDotStr(FullP, MSecP);}
TStr TTm::GetWebLogTimeStr | ( | ) | const [inline] |
Definition at line 290 of file tm.h.
References GetHMSTColonDotStr().
{return GetHMSTColonDotStr(false);}
int TTm::GetYear | ( | ) | const [inline] |
Definition at line 274 of file tm.h.
References Year.
Referenced by GetDateIntFromTm(), GetDateTimeIntFromTm(), GetMonthIntFromTm(), GetYearIntFromTm(), and TFPathNotify::UpdateSOut().
{return Year;}
uint TTm::GetYearIntFromTm | ( | const TTm & | Tm | ) | [static] |
Definition at line 1246 of file tm.cpp.
References GetDateTimeInt(), GetYear(), and IsDef().
{ return Tm.IsDef() ? GetDateTimeInt(Tm.GetYear()) : 0; }
TStr TTm::GetYMDDashStr | ( | ) | const |
Definition at line 971 of file tm.cpp.
References Day, GetStr(), Month, and Year.
Referenced by GetWebLogDateStr(), GetWebLogDateTimeStr(), and TLogNotify::OnStatus().
{ TChA ChA; ChA+=TInt::GetStr(Year, "%04d"); ChA+='-'; ChA+=TInt::GetStr(Month, "%02d"); ChA+='-'; ChA+=TInt::GetStr(Day, "%02d"); return ChA; }
bool TTm::IsDef | ( | ) | const [inline] |
Definition at line 264 of file tm.h.
References Day, Hour, Min, Month, MSec, Sec, and Year.
Referenced by GetDateIntFromTm(), GetDateTimeIntFromTm(), GetMonthIntFromTm(), and GetYearIntFromTm().
bool TTm::IsTimeDef | ( | ) | const [inline] |
uint TTm::KeepDayInDateTimeInt | ( | const uint & | DateTimeInt | ) | [static] |
Definition at line 1272 of file tm.cpp.
References EAssert, GetDateTimeInt(), and TSecTm::GetDayN().
{ EAssert(DateTimeInt != 0); TSecTm SecTm(DateTimeInt); return GetDateTimeInt(2000, 1, SecTm.GetDayN()); }
uint TTm::KeepHourInDateTimeInt | ( | const uint & | DateTimeInt | ) | [static] |
Definition at line 1278 of file tm.cpp.
References EAssert, GetDateTimeInt(), and TSecTm::GetHourN().
{ EAssert(DateTimeInt != 0); TSecTm SecTm(DateTimeInt); return GetDateTimeInt(2000, 1, 1, SecTm.GetHourN()); }
uint TTm::KeepMonthInDateTimeInt | ( | const uint & | DateTimeInt | ) | [static] |
Definition at line 1266 of file tm.cpp.
References EAssert, GetDateTimeInt(), and TSecTm::GetMonthN().
{ EAssert(DateTimeInt != 0); TSecTm SecTm(DateTimeInt); return GetDateTimeInt(2000, SecTm.GetMonthN(), 1); }
bool TTm::operator< | ( | const TTm & | Tm | ) | const [inline] |
Definition at line 248 of file tm.h.
References Day, Hour, Min, Month, MSec, Sec, and Year.
{ return (Year<Tm.Year)|| ((Year==Tm.Year)&&(Month<Tm.Month))|| ((Year==Tm.Year)&&(Month==Tm.Month)&&(Day<Tm.Day))|| (((Year==Tm.Year)&&(Month==Tm.Month)&&(Day==Tm.Day))&&( (Hour<Tm.Hour)|| ((Hour==Tm.Hour)&&(Min<Tm.Min))|| ((Hour==Tm.Hour)&&(Min==Tm.Min)&&(Sec<Tm.Sec))|| ((Hour==Tm.Hour)&&(Min==Tm.Min)&&(Sec==Tm.Sec)&&(MSec<Tm.MSec))));} // saxo
bool TTm::operator== | ( | const TTm & | Tm | ) | const [inline] |
Definition at line 236 of file tm.h.
References Day, DayOfWeek, Hour, Min, Month, MSec, TInt::Save(), Sec, and Year.
{ Year.Save(SOut); Month.Save(SOut); Day.Save(SOut); DayOfWeek.Save(SOut); Hour.Save(SOut); Min.Save(SOut); Sec.Save(SOut); MSec.Save(SOut);}
void TTm::SubDays | ( | const int & | Days | ) | [inline] |
void TTm::SubTime | ( | const int & | Hours, |
const int & | Mins = 0 , |
||
const int & | Secs = 0 , |
||
const int & | MSecs = 0 |
||
) |
Definition at line 1015 of file tm.cpp.
References GetMSecsFromTm(), and GetTmFromMSecs().
Referenced by SubDays().
{ uint64 TmMSecs=TTm::GetMSecsFromTm(*this); TmMSecs-=(uint64(Hours)*uint64(3600)*uint64(1000)); TmMSecs-=(uint64(Mins)*uint64(60)*uint64(1000)); TmMSecs-=(uint64(Secs)*uint64(1000)); TmMSecs-=(uint64(MSecs)); *this=GetTmFromMSecs(TmMSecs); }
void TTm::Undef | ( | ) | [inline] |
Definition at line 214 of file tm.h.
Referenced by GetDay(), GetIdStr(), GetPrimHashCd(), GetSecHashCd(), GetSecTm(), GetStr(), GetYMDDashStr(), IsDef(), operator<(), operator=(), operator==(), Save(), and Undef().
TInt TTm::DayOfWeek [private] |
Definition at line 214 of file tm.h.
Referenced by GetDayOfWeek(), GetDayOfWeekNm(), operator=(), Save(), and Undef().
Definition at line 215 of file tm.h.
Referenced by GetHMSTColonDotStr(), GetHour(), GetIdStr(), GetPrimHashCd(), GetSecTm(), GetStr(), IsDef(), IsTimeDef(), operator<(), operator=(), operator==(), Save(), and Undef().
Definition at line 215 of file tm.h.
Referenced by GetHMSTColonDotStr(), GetIdStr(), GetMin(), GetPrimHashCd(), GetSecTm(), GetStr(), IsDef(), IsTimeDef(), operator<(), operator=(), operator==(), Save(), and Undef().
TInt TTm::Month [private] |
Definition at line 214 of file tm.h.
Referenced by GetIdStr(), GetMonth(), GetMonthNm(), GetPrimHashCd(), GetSecHashCd(), GetSecTm(), GetStr(), GetYMDDashStr(), IsDef(), operator<(), operator=(), operator==(), Save(), and Undef().
Definition at line 215 of file tm.h.
Referenced by GetHMSTColonDotStr(), GetIdStr(), GetMSec(), GetPrimHashCd(), GetStr(), IsDef(), IsTimeDef(), operator<(), operator=(), operator==(), Save(), and Undef().
Definition at line 215 of file tm.h.
Referenced by GetHMSTColonDotStr(), GetIdStr(), GetPrimHashCd(), GetSec(), GetSecTm(), GetStr(), IsDef(), IsTimeDef(), operator<(), operator=(), operator==(), Save(), and Undef().
Definition at line 214 of file tm.h.
Referenced by GetIdStr(), GetPrimHashCd(), GetSecHashCd(), GetSecTm(), GetStr(), GetYear(), GetYMDDashStr(), IsDef(), operator<(), operator=(), operator==(), Save(), and Undef().