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


C++ GetDate函数代码示例

本文整理汇总了C++中GetDate函数的典型用法代码示例。如果您正苦于以下问题:C++ GetDate函数的具体用法?C++ GetDate怎么用?C++ GetDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: GetText

	void TaskDlg::UpdateData()
	{
		GetText(title, IDC_CREATE_TASK_EDIT_TITLE);
		GetText(desc, IDC_CREATE_TASK_EDIT_DESCRIPTION);
		GetText(assignee, IDC_CREATE_TASK_ASSIGNEE_COMBO);
		GetText(group, IDC_CREATE_TASK_GROUP_COMBO);

		start = GetDate(IDC_CREATE_TASK_DATETIMEPICKER_START, 0, 0);
		due = GetDate(IDC_CREATE_TASK_DATETIMEPICKER_DUE, 23, 59);

		TreeItem *pItem = m_pTaskCombo->GetSelectedItem();
		if(pItem)
		{
			TaskItem *pTaskItem = static_cast<TaskItem *>(pItem);
			parentId = pTaskItem->m_pTask->GetId();
			parentTask = pTaskItem->m_pTask;
		}

		HWND hwndTemp = GetDlgItem(m_hwnd, IDC_CREATE_TASK_COMBO_PRIORITY);
		LRESULT comboItem = ::SendMessage(hwndTemp, CB_GETCURSEL, 0, 0);
		priority = comboItem != CB_ERR? comboItem + 1: 3;

		estimate = 0;//EMPTY_DURATION;
		if(m_pEstDuration->IsChecked())
		{
			estimate = m_pEstDuration->GetDuration();
		}


	}
开发者ID:jaylauffer,项目名称:loadngo,代码行数:30,代码来源:TaskDlg.cpp

示例2: CheckSymbolsAndWriteOut

bool CheckSymbolsAndWriteOut(const char *define_type, const char *define_value, char *sOut)
{
	if( !strcmp(define_type, STRING_DATE) )
	{
		char sNewDate[50];
		if( !GetDate(sNewDate, NULL, true) )
			return false;
		
		str_ReplaceOnce(strstr(sOut, STRING_DATE), define_value, sNewDate);
	}
	if( !strcmp(define_type, STRING_TIME) )
	{
		char sNewTime[50];
		if( !GetDate(NULL, sNewTime, true) )
			return false;
		
		str_ReplaceOnce(strstr(sOut, STRING_TIME), define_value, sNewTime);
	}
	if( !strcmp(define_type, STRING_BUILD) )
	{
		char sNewBuild[50];
		if(!bIncrementVersion)
			return true;
		sprintf( sNewBuild, "%d", atoi(define_value)+1 );
		str_ReplaceOnce(strstr(sOut, STRING_BUILD), define_value, sNewBuild);
	}
	return true;
}
开发者ID:githubbar,项目名称:NewVision,代码行数:28,代码来源:makeversion.c

示例3: GetDate

size_t mitk::DiffusionCollectionWriter::GetIndexForinXMonths(mitk::DiffusionCollectionReader::FileListType fileList,float months, size_t curIndex,std::vector<std::string> filter)
{
  std::string strDate0 = GetDate(fileList.at(0).at(curIndex),filter.at(0),true);

  int year0 =std::atoi(strDate0.substr(0,4).c_str());
  int month0 =std::atoi(strDate0.substr(5,2).c_str());
  int day0 = std::atoi(strDate0.substr(8,2).c_str());

  size_t bestIndex = 0;
  int bestFit = 1e5;

  for (size_t i=curIndex+1; i < fileList.at(0).size(); ++i)
  {
    std::string strDate = GetDate(fileList.at(0).at(i),filter.at(0),true);
    int year =std::atoi(strDate.substr(0,4).c_str());
    int month =std::atoi(strDate.substr(5,2).c_str());
    int day = std::atoi(strDate.substr(8,2).c_str());

    int fit = std::fabs((months * 30 ) - (((year-year0)*360) +((month-month0)*30) + (day-day0))); // days difference from x months
    if (fit < bestFit)
    {
      bestFit = fit;
      bestIndex = i;
    }
  }
  return bestIndex;
}
开发者ID:Cdebus,项目名称:MITK,代码行数:27,代码来源:mitkDiffusionCollectionWriter.cpp

示例4: GetSequence

void CertDecoder::GetValidity()
{
    if (source_.GetError().What()) return;

    GetSequence();
    GetDate(BEFORE);
    GetDate(AFTER);
}
开发者ID:zhongliangkang,项目名称:mysql-5.6.6-labs-april-2012-sky,代码行数:8,代码来源:asn.cpp

示例5: FileContentInit

/*
*********************************************************************************************************
*                                        Title in the file
*********************************************************************************************************
*/
void FileContentInit(void) {
	FILE* fp_source,*fp_receive;
	char filename[25];
	GetDate(filename);
	strcat(filename,"Sd.dat");
	fp_source = fopen(filename,"w");
	fprintf(fp_source,"%11s%5s%5s%5s%5s%5s%5s%5s%5s%5s%6s\n%6s","Source:(1)","(2)","(3)","(4)","(5)","(6)","(7)","(8)","(9)","(10)","(AVG)"," ");
	fclose(fp_source);
	GetDate(filename);
	strcat(filename,"Rv.dat");
	fp_receive = fopen(filename,"w");
	fprintf(fp_receive, "%11s%5s%5s%5s%5s%5s%5s%5s%5s%5s%6s\n%6s","Receive:(1)","(2)","(3)","(4)","(5)","(6)","(7)","(8)","(9)","(10)","(AVG)"," ");
	fclose(fp_receive);
}
开发者ID:loganwhite,项目名称:uCOSIIExp,代码行数:19,代码来源:TEST.C

示例6: GetDate

void CTraderApi::OnRtnForQuote(CUstpFtdcReqForQuoteField *pReqForQuote)
{
	QuoteRequestField* pField = (QuoteRequestField*)m_msgQueue->new_block(sizeof(QuoteRequestField));

	pField->TradingDay = GetDate(pReqForQuote->TradingDay);
	pField->QuoteTime = GetDate(pReqForQuote->ReqForQuoteTime);
	strcpy(pField->Symbol, pReqForQuote->InstrumentID);
	strcpy(pField->InstrumentID, pReqForQuote->InstrumentID);
	strcpy(pField->ExchangeID, pReqForQuote->ExchangeID);
	sprintf(pField->Symbol, "%s.%s", pField->InstrumentID, pField->ExchangeID);
	strcpy(pField->QuoteID, pReqForQuote->ReqForQuoteID);

	m_msgQueue->Input_NoCopy(ResponeType::OnRtnQuoteRequest, m_msgQueue, m_pClass, 0, 0,
		pField, sizeof(QuoteRequestField), nullptr, 0, nullptr, 0);
}
开发者ID:ZHPHAN,项目名称:QuantBox_XAPI,代码行数:15,代码来源:TraderApi.cpp

示例7: SetRTCTime

/*********************************
**函数名:SetRTCTime
**功能:设置时间,除了把Real_Time的值改变外,还要把时分秒转换为RTC计数值,年月日存到后备寄存器上
**注意事项:函数内会自动根据年月日计算星期,并且返回到*time上
**********************************/
void SetRTCTime(T_STRUCT* time)
{
	u32 count;
	RTC_ITConfig(RTC_IT_SEC, DISABLE);	//关闭秒中断

	RTC_WaitForLastTask();
	//付时间值到Real_Time上
	Real_Time.year=time->year;
	Real_Time.month=time->month;
	Real_Time.day=time->day;
	Real_Time.hour=time->hour;
	Real_Time.minute=time->minute;
	Real_Time.sec=time->sec;
	//计算星期
	time->date=Real_Time.date=GetDate(time);

	//把新的年月日存到掉电寄存器上

	BKP_WriteBackupRegister(BKP_TIME_DATE,Real_Time.date);
//	RTC_WaitForLastTask();
	BKP_WriteBackupRegister(BKP_TIME_DAY,Real_Time.day);
//	RTC_WaitForLastTask();
	BKP_WriteBackupRegister(BKP_TIME_MONTH,Real_Time.month);
//	RTC_WaitForLastTask();
	BKP_WriteBackupRegister(BKP_TIME_YEAR,Real_Time.year);
//	RTC_WaitForLastTask();

	//计算新的RTC count值
	count=Real_Time.hour*3600+Real_Time.minute*60+Real_Time.sec;
	RTC_WaitForLastTask();
	RTC_SetCounter(count);
	RTC_WaitForLastTask();
	RTC_ITConfig(RTC_IT_SEC, ENABLE); //打开秒中断
}
开发者ID:jiangtaojiang,项目名称:bloodpressure,代码行数:39,代码来源:RTC.c

示例8: Show4Months

BOOL WINAPI Show4Months(CCallbacks* pCallback, const char* szFile, HWND pParent)
{
	char szOutKey[256]={0};
	char szOutTitle[256]={0};
	BOOL bRes=GetDate(pCallback, szOutKey, sizeof(szOutKey), szOutTitle, sizeof(szOutTitle));
	return bRes;
}
开发者ID:calupator,项目名称:wiredplane-wintools,代码行数:7,代码来源:Pickers.cpp

示例9: return

//============================================================================
//		NDate::GetDayOfWeek : Get the day of the week.
//----------------------------------------------------------------------------
NIndex NDate::GetDayOfWeek(const NString &timeZone) const
{


    // Get the day of the week
    return(NTargetTime::GetDayOfWeek(GetDate(timeZone)));
}
开发者ID:refnum,项目名称:nano,代码行数:10,代码来源:NDate.cpp

示例10: GetDate

int32 FDateTime::GetDay( ) const
{
	int32 Year, Month, Day;
	GetDate(Year, Month, Day);

	return Day;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:7,代码来源:DateTime.cpp

示例11: switch

void CalendarControl::MessageReceived(BMessage *msg)
{
 switch(msg->what)
 {
  case CalendarControlButtonPressedMessage:
  {
   if(IsEnabled())
   {
    MakeFocus(true);
    int day, month, year;
    int first_year, last_year;
    GetDate(&day, &month, &year);
    GetYearRange(&first_year, &last_year);
    new MonthWindow(ConvertToScreen(BPoint(Bounds().left+1,Bounds().bottom+1)),
                                    new BMessenger(this),
                                    day, month, year, first_year, last_year);
   }
   break;
  }
  case 'MVME': // message has come from window with calendar
  {
   int32 day, month, year;
   msg->FindInt32("day",&day);
   msg->FindInt32("month",&month);
   msg->FindInt32("year",&year);
   SetDate((int)day, (int)month, (int)year);
   break;
  }
  default:
   BControl::MessageReceived(msg);
 }
}
开发者ID:BackupTheBerlios,项目名称:projectconcepto-svn,代码行数:32,代码来源:CalendarControl.cpp

示例12: StatePrintRace

void StatePrintRace( ISState* pThis, int pTrack )
{
   int lCounter;

   if( pThis->mRaceTrackIndex[pTrack] != -1 )
   {

      printf( "<table border=2>\n" );

      printf( "<tr><td colspan=5>%s %d Laps</td></tr>\n",
               pThis->mTrack[ pThis->mRaceTrackIndex[ pTrack ] ].mName,
               pThis->mRaceTrackLaps[ pTrack ] );

      printf( "<tr><td>Rank</td><td>Player</td><td>Time</td><td>Date</td><td>Craft</td></tr>\n" );

      for( lCounter = 0; lCounter < IR_MAX_PLAYER_BT; lCounter++ )
      {
         if( pThis->mRaceRecord[pTrack][lCounter].mDuration > 0 )
         {
            printf( "<tr><td>%d</td><td>%s</td><td>%2d:%02d:%02d</td><td>%s</td><td>%s</td></tr>\n",
                    lCounter+1,
                    pThis->mRaceRecord[pTrack][lCounter].mUser,
                    (pThis->mRaceRecord[pTrack][lCounter].mDuration/60000),
                    (pThis->mRaceRecord[pTrack][lCounter].mDuration/1000)%60,
                    (pThis->mRaceRecord[pTrack][lCounter].mDuration/10)%100,                  
                    GetDate(pThis->mRaceRecord[pTrack][lCounter].mDate),
                    CraftModels[pThis->mRaceRecord[pTrack][lCounter].mCraft].mName );
         }
      }
      printf( "</table>" );
   }
}
开发者ID:johnsie,项目名称:IMR,代码行数:32,代码来源:ServerScore2.c

示例13: GetDate

bool wxCalendarCtrlBase::GenerateAllChangeEvents(const wxDateTime& dateOld)
{
    const wxDateTime::Tm tm1 = dateOld.GetTm(),
                         tm2 = GetDate().GetTm();

    bool pageChanged = false;

    GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED);
    if ( tm1.year != tm2.year || tm1.mon != tm2.mon )
    {
        GenerateEvent(wxEVT_CALENDAR_PAGE_CHANGED);

        pageChanged = true;
    }

    // send also one of the deprecated events
    if ( tm1.year != tm2.year )
        GenerateEvent(wxEVT_CALENDAR_YEAR_CHANGED);
    else if ( tm1.mon != tm2.mon )
        GenerateEvent(wxEVT_CALENDAR_MONTH_CHANGED);
    else
        GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED);

    return pageChanged;
}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:25,代码来源:calctrlcmn.cpp

示例14: ErrLog

void ErrLog( char *file, int line, char *fmt, ... )
{
    va_list ap;
    FILE   *fp;
    int    fd;
    char timebuf[20];
    char datebuf[20];
		char log_name[100];

		memset( log_name, 0, sizeof( log_name ) ) ;
		memset( datebuf, 0, sizeof( datebuf ) ) ;
		GetDate( datebuf );
		strcpy( log_name, LOG_FILE_NAME ) ;
		strcat( log_name, "." ) ;
		strcat( log_name, datebuf ) ;

    if ( (fp=fopen( log_name, "a+")) == NULL ) {
        fprintf(stderr, "open %s file error.\n", LOG_FILE_NAME);
        return;
    }
    fd = fileno(fp);
    lockf (fd, F_LOCK, 0l);
    GetTime( timebuf );
    fprintf (fp, "[%s] ", timebuf );
    fprintf (fp, "[%s line %d] :\n", file, line);
    va_start( ap, fmt );
    vfprintf( fp, fmt, ap );
		fprintf(fp, "\n");
    va_end( ap );
    lockf(fd, F_ULOCK, 0l);
    fclose(fp);
    return;
}
开发者ID:mildrock,项目名称:netBankGateWay,代码行数:33,代码来源:flog.c

示例15: GetISBN

/*********************************************************
*函数名:    Print()
*函数功能:  输入单个图书的全部信息
*
*函数参数:  void
*函数返回值:void
*********************************************************/
void Book::Print()
{
    cout <<  GetISBN()  << '\t'  << GetTitle() << '\t';
    cout << GetAuthor() << '\t'  << GetPublisher() << '\t';
    cout << GetDate() << '\t' << GetPrice();
    cout << setw(10) << GetCatalogNum() << setw(11) << GetNumber() << endl;
}
开发者ID:AI-Ying,项目名称:C-plus-plus-BookManage1.0,代码行数:14,代码来源:Book.cpp


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