Click here to Skip to main content
15,927,514 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHTML View Question Pin
inforix11-Oct-01 5:10
inforix11-Oct-01 5:10 
GeneralRe: HTML View Question Pin
Paolo Messina11-Oct-01 5:40
professionalPaolo Messina11-Oct-01 5:40 
GeneralRe: HTML View Question Pin
inforix11-Oct-01 15:31
inforix11-Oct-01 15:31 
GeneralRe: HTML View Question Pin
Paolo Messina13-Oct-01 0:11
professionalPaolo Messina13-Oct-01 0:11 
GeneralList control and timers Pin
RobJones11-Oct-01 4:45
RobJones11-Oct-01 4:45 
GeneralRe: List control and timers Pin
Bill Wilson11-Oct-01 5:12
Bill Wilson11-Oct-01 5:12 
GeneralDate Conversions Pin
Derek Lakin11-Oct-01 4:22
Derek Lakin11-Oct-01 4:22 
GeneralRe: Date Conversions Pin
Jon Hulatt11-Oct-01 4:40
Jon Hulatt11-Oct-01 4:40 
Does it really have to be particularly efficient?

void FormatDate( int nDay, int nYear)
{
  int nLeapYear;

  // january
  nDay-=31; // 31 days in jan
  if (nDay <= 0) {
    // month is january
    // day of month is nDay + 31;
  }

  // february
  if (( (nYear /4) * 4) == nYear) nLeapYear=1 // a leap year
  nDay= nDay - 28 - nLeapYear;
  if (nDay <= 0) {
    // month is feb
    // day of month is nDay+28+nLeapYear
  }

  // etc for march, april and so on

}


not tested that, but shouldn't be too far from the correct one

Sorry to dissapoint you all with my lack of a witty or poignant signature.
GeneralRe: Date Conversions Pin
Tomasz Sowinski11-Oct-01 4:46
Tomasz Sowinski11-Oct-01 4:46 
GeneralRe: Date Conversions Pin
Jon Hulatt11-Oct-01 5:45
Jon Hulatt11-Oct-01 5:45 
GeneralRe: Date Conversions Pin
Tomasz Sowinski11-Oct-01 5:52
Tomasz Sowinski11-Oct-01 5:52 
GeneralRe: Date Conversions Pin
Carlos Antollini11-Oct-01 4:50
Carlos Antollini11-Oct-01 4:50 
GeneralSending text to another window Pin
Sinoth11-Oct-01 3:52
Sinoth11-Oct-01 3:52 
GeneralRe: Sending text to another window Pin
Carlos Antollini11-Oct-01 4:14
Carlos Antollini11-Oct-01 4:14 
GeneralRe: Sending text to another window Pin
Nish Nishant11-Oct-01 5:07
sitebuilderNish Nishant11-Oct-01 5:07 
QuestionHow to do?? Pin
11-Oct-01 3:12
suss11-Oct-01 3:12 
AnswerRe: How to do?? Pin
Jon Hulatt11-Oct-01 3:59
Jon Hulatt11-Oct-01 3:59 
AnswerRe: How to do?? Pin
Carlos Antollini11-Oct-01 4:05
Carlos Antollini11-Oct-01 4:05 
QuestionAn easy TimeOut ? Pin
José Luis Sogorb11-Oct-01 0:13
José Luis Sogorb11-Oct-01 0:13 
GeneralDebugging internet application Pin
10-Oct-01 21:40
suss10-Oct-01 21:40 
QuestionHow to do?? Pin
10-Oct-01 21:32
suss10-Oct-01 21:32 
AnswerRe: How to do?? Pin
Christian Graus10-Oct-01 22:04
protectorChristian Graus10-Oct-01 22:04 
AnswerRe: How to do?? Pin
Bernhard10-Oct-01 23:37
Bernhard10-Oct-01 23:37 
AnswerRe: How to do?? Pin
Tomasz Sowinski11-Oct-01 2:11
Tomasz Sowinski11-Oct-01 2:11 
GeneralMemory Allocation Issues -- EXEs and DLLs Pin
Peter Weyzen10-Oct-01 18:49
Peter Weyzen10-Oct-01 18:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.