当前位置: 首页>>代码示例>>C++>>正文


C++ TTm::GetDay方法代码示例

本文整理汇总了C++中TTm::GetDay方法的典型用法代码示例。如果您正苦于以下问题:C++ TTm::GetDay方法的具体用法?C++ TTm::GetDay怎么用?C++ TTm::GetDay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TTm的用法示例。


在下文中一共展示了TTm::GetDay方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetMSecsFromTm

uint64 TSysTm::GetMSecsFromTm(const TTm& Tm){
  SYSTEMTIME SysTm; FILETIME FileTm;
  SysTm.wYear=WORD(Tm.GetYear());
  SysTm.wMonth=WORD(Tm.GetMonth());
  SysTm.wDayOfWeek=WORD(Tm.GetDayOfWeek());
  SysTm.wDay=WORD(Tm.GetDay());
  SysTm.wHour=WORD(Tm.GetHour());
  SysTm.wMinute=WORD(Tm.GetMin());
  SysTm.wSecond=WORD(Tm.GetSec());
  SysTm.wMilliseconds=WORD(Tm.GetMSec());
  ESAssert(SystemTimeToFileTime(&SysTm, &FileTm));
  TUInt64 UInt64(uint(FileTm.dwHighDateTime), uint(FileTm.dwLowDateTime));
  return UInt64.Val/uint64(10000);
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:14,代码来源:os.cpp

示例2: GetLocTmFromUniTm

TTm TSysTm::GetLocTmFromUniTm(const TTm& Tm){
  // get time-zone information
  TIME_ZONE_INFORMATION TzInf;
  GetTimeZoneInformation(&TzInf);
  // get system time
  SYSTEMTIME UniSysTm;
  UniSysTm.wYear=WORD(Tm.GetYear());
  UniSysTm.wMonth=WORD(Tm.GetMonth());
  UniSysTm.wDayOfWeek=WORD(Tm.GetDayOfWeek());
  UniSysTm.wDay=WORD(Tm.GetDay());
  UniSysTm.wHour=WORD(Tm.GetHour());
  UniSysTm.wMinute=WORD(Tm.GetMin());
  UniSysTm.wSecond=WORD(Tm.GetSec());
  UniSysTm.wMilliseconds=WORD(Tm.GetMSec());
  // convert system-time
  SYSTEMTIME LocSysTm;
  SystemTimeToTzSpecificLocalTime(&TzInf, &UniSysTm, &LocSysTm);
  // return local-time
  return TTm(LocSysTm.wYear, LocSysTm.wMonth, LocSysTm.wDay, LocSysTm.wDayOfWeek,
   LocSysTm.wHour, LocSysTm.wMinute, LocSysTm.wSecond, LocSysTm.wMilliseconds);
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:21,代码来源:os.cpp

示例3: GetUniTmFromLocTm

TTm TSysTm::GetUniTmFromLocTm(const TTm& Tm){
  // get time-zone information
  TIME_ZONE_INFORMATION TzInf;
  GetTimeZoneInformation(&TzInf);
  // get system time
  SYSTEMTIME LocSysTm;
  LocSysTm.wYear=WORD(Tm.GetYear());
  LocSysTm.wMonth=WORD(Tm.GetMonth());
  LocSysTm.wDayOfWeek=WORD(Tm.GetDayOfWeek());
  LocSysTm.wDay=WORD(Tm.GetDay());
  LocSysTm.wHour=WORD(Tm.GetHour());
  LocSysTm.wMinute=WORD(Tm.GetMin());
  LocSysTm.wSecond=WORD(Tm.GetSec());
  LocSysTm.wMilliseconds=WORD(Tm.GetMSec());
  // convert system-time
  SYSTEMTIME UniSysTm=LocSysTm;
  Fail; // BCB5.0 doesn't find TzSpecificLocalTimeToSystemTime
  //TzSpecificLocalTimeToSystemTime(&TzInf, &LocSysTm, &UniSysTm);
  // return system-time
  return TTm(UniSysTm.wYear, UniSysTm.wMonth, UniSysTm.wDay, UniSysTm.wDayOfWeek,
   UniSysTm.wHour, UniSysTm.wMinute, UniSysTm.wSecond, UniSysTm.wMilliseconds);
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:22,代码来源:os.cpp

示例4: AbsSecs

TSecTm::TSecTm(const TTm& Tm): AbsSecs(
 TSecTm(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay(), Tm.GetHour(),
   Tm.GetMin(), int(TMath::Round(Tm.GetSec()*1000+Tm.GetMSec()))).GetAbsSecs()){}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:3,代码来源:tm.cpp

示例5: GetDateTimeIntFromTm

uint TTm::GetDateTimeIntFromTm(const TTm& Tm) {
    return GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(),
        Tm.GetDay(), Tm.GetHour(), Tm.GetMin());
}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:4,代码来源:tm.cpp

示例6: AbsSecs

TSecTm::TSecTm(const TTm& Tm): AbsSecs(
 TSecTm(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay(), Tm.GetHour(),
   Tm.GetMin(), Tm.GetSec()).GetAbsSecs()) { }
开发者ID:jethrotan,项目名称:qminer,代码行数:3,代码来源:tm.cpp

示例7: GetDateTimeIntFromTm

uint TTm::GetDateTimeIntFromTm(const TTm& Tm) {
    return Tm.IsDef() ? 
		GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(),
        Tm.GetDay(), Tm.GetHour(), Tm.GetMin(), Tm.GetSec()) : 0;
}
开发者ID:jethrotan,项目名称:qminer,代码行数:5,代码来源:tm.cpp


注:本文中的TTm::GetDay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。